Function at 0x47eb20
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 0x47eb7e
push ecx
mov eax, esp
mov dword [ebp + 0xc], esp
push str.AddFile:_adding_0_bytes_file
push eax
call fcn.00466ad0
add esp, 8
call fcn.0047e870
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 0x47eba2
jl 0x47eb9d
cmp edi, edx
jae 0x47eba2
mov dword [ebp - 8], edi
jmp 0x47eba5
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 0x47ed11
cmp dword [0x51ebe8], 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 0x47ec18
push 0x51ebcc
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x51ebe8]
push 0
push eax
push ebx
push edi
call fcn.004bed50
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 0x47ec55
mov ebx, eax
sub ebx, edi
add ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x1c], ebx
jmp 0x47ec58
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x47ed3f
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 0x47ed53
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
mov edx, dword [esi + 0xc]
push edx
mov edx, dword [esi + 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 0x47ecc4
jg 0x47ecb9
mov ebx, dword [ebp - 0x2c]
cmp ebx, dword [ebp - 0x14]
jbe 0x47ecc4
mov ebx, dword [ebp - 0x14]
sub dword [ebp - 0x2c], ebx
sbb dword [ebp - 0x28], edx
jmp 0x47eccc
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 0x47ed84
jg 0x47ed06
cmp dword [ebp - 0x2c], 0
jbe 0x47ed84
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x2c]
jmp 0x47eb90
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.00466ad0
add esp, 0x10
call fcn.0047e870
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 0x47ed65
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.00466ad0
add esp, 0xc
call fcn.0047e870
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