Function at 0x480980
Capabilities:
Get system information on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov ecx, dword [ebp + 0x18]
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x14]
push ebx
push edi
mov edi, dword [esi + 0x18]
mov edx, eax
or eax, ecx
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], ecx
jne 0x4809de
push ecx
mov eax, esp
mov dword [ebp + 0xc], esp
push str.AddFile:_adding_0_bytes_file
push eax
call fcn.00466a00
add esp, 8
call fcn.004806d0
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [esi + 8]
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov ecx, dword [esi + 0xc]
mov dword [eax + 4], ecx
lea esp, [esp]
xor eax, eax
cmp eax, dword [ebp - 0x28]
jg 0x480a02
jl 0x4809fd
cmp edi, edx
jae 0x480a02
mov dword [ebp - 8], edi
jmp 0x480a05
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
add eax, 0x2000
xor edx, edx
mov dword [ebp - 0xc], eax
add eax, dword [esi + 8]
push 0
adc edx, dword [esi + 0xc]
lea ecx, [ebp - 0x40]
push ecx
mov dword [ebp - 0x40], edx
mov edx, dword [esi]
push eax
push edx
mov dword [ebp - 0x44], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ecx, dword [esi]
push 0
push 0
push 0
push 4
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x480b69
cmp dword [0x509e88], 0
mov edi, dword [esi + 8]
mov edx, dword [ebp - 0xc]
mov ebx, dword [esi + 0xc]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x20], edx
jne 0x480a78
push 0x509e6c
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x509e88]
push 0
push eax
push ebx
push edi
call fcn.004b8300
mov ecx, dword [ebp - 0x10]
sub edi, eax
mov eax, dword [ebp - 0x20]
sbb ebx, edx
sub eax, edi
add eax, dword [ebp - 0x4c]
push eax
push edi
push ebx
push 6
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x480ab5
mov ebx, eax
sub ebx, edi
add ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x1c], ebx
jmp 0x480ab8
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x480b97
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push 4
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
je 0x480bab
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [ebp - 0xc]
push edx
mov edx, dword [ebp - 8]
push edx
push ebx
push edi
call eax
mov eax, dword [ebp - 0xc]
xor ecx, ecx
add dword [esi + 8], eax
adc dword [esi + 0xc], ecx
xor edx, edx
cmp dword [ebp - 0x28], edx
jl 0x480b1c
jg 0x480b11
mov ebx, dword [ebp - 0x2c]
cmp ebx, dword [ebp - 0x14]
jbe 0x480b1c
mov ebx, dword [ebp - 0x14]
sub dword [ebp - 0x2c], ebx
sbb dword [ebp - 0x28], edx
jmp 0x480b24
xor edx, edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 8]
add dword [ebp - 0x34], edx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
adc dword [ebp - 0x30], ecx
add dword [ebp - 0x3c], eax
adc dword [ebp - 0x38], ecx
call edi
mov eax, dword [ebp - 0x20]
push eax
call edi
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], 0
jl 0x480bdc
jg 0x480b5e
cmp dword [ebp - 0x2c], 0
jbe 0x480bdc
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x2c]
jmp 0x4809f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, esp
mov dword [ebp + 0xc], esp
push eax
mov eax, dword [ebp - 0xc]
push eax
push str.AddFile:_error_extending_VFC_file_by__d_bytes__LE_d
push edx
call fcn.00466a00
add esp, 0x10
call fcn.004806d0
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push eax
push str._AddFile:_Dest_mapping_failed__LE_d
jmp 0x480bbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push eax
push str._AddFile:_Src_mapping_failed__LE_d
push ecx
call fcn.00466a00
add esp, 0xc
call fcn.004806d0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
mov ecx, dword [esi + 8]
mov eax, dword [ebp + 0xc]
sub ecx, dword [eax]
mov edx, dword [esi + 0xc]
sbb edx, dword [eax + 4]
mov eax, dword [ebp + 0x10]
pop edi
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x18]
pop ebx
mov esp, ebp
pop ebp
ret 0x14