Function at 0x480850
Capabilities:
Check if file exists
Get file attributes
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d109b
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x50cc94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [edi + 0x70]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00483970
mov byte [ebp - 4], 1
call fcn.004a1286
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4808a7
push 0x80004005
call fcn.00421000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [edi + 0x8c], eax
push ecx
mov byte [ebp - 4], 2
mov esi, esp
mov dword [ebp - 0x20], esp
mov dword [ebp - 0x24], esi
call fcn.004a1286
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4808e0
push 0x80004005
call fcn.00421000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi], eax
mov eax, str..dat
shr eax, 0x10
mov byte [ebp - 4], 3
mov dword [ebp - 0x1c], eax
cmp eax, ebx
jne 0x480a9f
mov ecx, str..dat
movzx ebx, cx
push ebx
call fcn.004a91be
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4809ec
mov edx, ebx
shr edx, 4
inc edx
movzx ecx, dx
push 6
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4809ec
mov edx, dword [ebp - 0x14]
push ebx
push eax
push edx
call fcn.00421708
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x14], edx
test edx, edx
je 0x4809ec
mov eax, dword [esi]
movzx ebx, word [edx]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, ebx
or eax, ecx
jge 0x480978
push ebx
mov ecx, esi
call fcn.00421527
mov edx, dword [ebp - 0x14]
mov eax, dword [esi]
mov dword [ebp - 0x18], eax
movzx eax, word [edx]
lea ecx, [edx + 2]
mov dword [ebp - 0x14], ecx
cmp eax, 0xffffffff
jne 0x480998
push ecx
call fcn.004af97a
mov ecx, dword [ebp - 0x14]
add esp, 4
inc eax
add eax, eax
push eax
push ecx
mov ecx, dword [ebp - 0x18]
lea edx, [ebx + ebx]
push edx
push ecx
mov dword [ebp - 0x14], edx
call fcn.004af400
add esp, 0x10
cmp eax, 0x50
ja case.0x480b86.1
movzx edx, byte [eax + 0x480da4]
jmp dword [edx*4 + 0x480d94]
call fcn.004a17ee
test ebx, ebx
jl 0x480a95
mov eax, dword [esi]
cmp ebx, dword [eax - 8]
jg 0x480a95
mov edx, dword [ebp - 0x14]
mov dword [eax - 0xc], ebx
mov eax, dword [esi]
xor ecx, ecx
mov word [edx + eax], cx
xor ebx, ebx
mov byte [ebp - 4], 4
mov eax, dword [ebp + 0xc]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x24], esp
mov esi, esp
push eax
call fcn.004242ab
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x10]
add esp, 4
push eax
mov byte [ebp - 4], 2
call fcn.00468fd0
mov ecx, dword [ebp - 0x10]
add esp, 0xc
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor edx, edx
cmp eax, 0xffffffff
mov eax, dword [ebp - 0x10]
setne dl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov esi, edx
mov edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x480a51
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, ebx
je 0x480d24
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.constructor:_separate_data_file_found
push ecx
call fcn.00468c80
add esp, 8
call fcn.00480780
push ecx
mov esi, esp
mov dword [ebp - 0x24], esp
mov dword [ebp - 0x10], esi
call fcn.004a1286
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x480abe
push 0x80004005
call fcn.00421000
push 0x80070057
call fcn.00421000
push str..dat
call fcn.004af97a
add esp, 4
push eax
push str..dat
mov ecx, esi
call fcn.0042423a
jmp 0x4809ee
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 5
cmp dword [ebp - 0x1c], ebx
jne 0x480bb8
mov ecx, str..dat
movzx esi, cx
push esi
call fcn.004a91be
mov ebx, eax
test ebx, ebx
je 0x480bd2
mov edx, esi
shr edx, 4
inc edx
movzx eax, dx
push 6
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x480bd2
push esi
push eax
push ebx
call fcn.00421708
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x480bd2
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
movzx esi, word [ebx]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, esi
or eax, ecx
jge 0x480b48
push esi
mov ecx, edx
call fcn.00421527
mov edx, dword [ebp - 0x10]
movzx eax, word [ebx]
mov ecx, dword [edx]
add ebx, 2
mov dword [ebp - 0x1c], ecx
cmp eax, 0xffffffff
jne 0x480b62
push ebx
call fcn.004af97a
add esp, 4
inc eax
lea edx, [eax + eax]
mov eax, dword [ebp - 0x1c]
push edx
lea ecx, [esi + esi]
push ebx
push ecx
push eax
mov dword [ebp - 0x18], ecx
call fcn.004af400
add esp, 0x10
cmp eax, 0x50
ja case.0x480b86.1
movzx ecx, byte [eax + 0x480e08]
jmp dword [ecx*4 + 0x480df8]
call fcn.004a1826
test esi, esi
jl 0x480a95
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
cmp esi, dword [eax - 8]
jg 0x480a95
mov dword [eax - 0xc], esi
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x18]
xor eax, eax
mov word [ecx + edx], ax
jmp 0x480bd2
push str..dat
call fcn.004af97a
add esp, 4
push eax
push str..dat
mov ecx, esi
call fcn.0042423a
mov byte [ebp - 4], 6
mov eax, dword [ebp + 0xc]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x20], esp
mov esi, esp
push eax
call fcn.004242ab
add eax, 0x10
lea edx, [ebp - 0x14]
add esp, 4
mov dword [esi], eax
push edx
mov byte [ebp - 4], 2
call fcn.00468fd0
add esp, 0xc
mov byte [ebp - 4], 7
mov ecx, dword [eax]
mov esi, dword [edi + 0x8c]
lea ebx, [edi + 0x8c]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x480c63
cmp dword [esi + 0xc], 0
jl 0x480c57
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x480c57
push eax
call fcn.004242ab
mov dword [ebp - 0x1c], eax
add esp, 4
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x480c4d
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x10
mov dword [ebx], ecx
jmp 0x480c63
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, ebx
call fcn.0042423a
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x480c86
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ebx, ebx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
lea ecx, [edi + 0x40]
push ecx
mov dword [edi], 0xffffffff
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], edx
mov dword [edi + 0x68], ebx
mov dword [edi + 0x6c], ebx
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x20], ebx
mov dword [edi + 0x28], ebx
mov dword [edi + 0x2c], ebx
mov dword [edi + 0x30], ebx
mov dword [edi + 0x34], ebx
mov dword [edi + 0x88], ebx
mov dword [edi + 0x38], ebx
mov dword [edi + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [edi + 0x5c]
xor edx, edx
mov eax, 0x400000
div ecx
imul eax, ecx
mov dword [edi + 0x64], eax
call fcn.00481380
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x480d0e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0xc]
mov esi, dword [edi + 0x8c]
lea ecx, [edi + 0x8c]
add eax, 0xfffffff0
sub esi, 0x10
cmp eax, esi
je 0x480c88
cmp dword [esi + 0xc], ebx
jl 0x480d82
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x480d82
push eax
call fcn.004242ab
mov dword [ebp - 0x1c], eax
add esp, 4
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x480d71
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x10
mov dword [edi + 0x8c], ecx
jmp 0x480c88
mov eax, dword [ebp + 0xc]
mov edx, dword [eax - 0xc]
push edx
push eax
call fcn.0042423a
jmp 0x480c88