Function at 0x403220
Capabilities:
Get file size
Initialize winhttp library
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push edi
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov edi, eax
push 0x45bf18
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403206
push ebp
push esi
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
push 8
push edi
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
je 0x4031e9
push 0
lea eax, [esp + 0x1c]
push eax
push esi
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4031c2
lea ecx, [esp + 0x1c]
push ecx
call fcn.00405400
add esp, 4
push str.__45_LoadedContent
push esi
push 0
push 4
lea edx, [esp + 0x2c]
push edx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
test edi, edi
je 0x40318a
push edi
push 1
call fcn.00405380
add esp, 8
push 0
push 0
push 0
push 2
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
je 0x403186
push esi
push ebp
push edi
call fcn.004054e0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
push esi
mov dword [0xeea94c], esi
call fcn.00402170
lea eax, [esp + 0x24]
add esp, 8
push eax
mov byte [esp + 0x17], 1
call fcn.00405360
mov edi, dword [esp + 0x18]
add esp, 4
push ebp
push 0
push edi
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x18
ret
push 0x28
jmp 0x40318c
push 0x29
call fcn.004019c0
lea eax, [esp + 0x20]
add esp, 4
push eax
call fcn.00405360
mov edi, dword [esp + 0x18]
add esp, 4
push ebp
push 0
push edi
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x18
ret
push 0x2a
call fcn.004019c0
add esp, 4
push ebp
push 0
push edi
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x18
ret
push 0x2b
call fcn.004019c0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x18
ret
push 0x2c
call fcn.004019c0
mov al, byte [esp + 0xf]
add esp, 4
pop edi
pop ebx
add esp, 0x18
ret
sub esp, 0x28
push str.FILE
push 0x4de120
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x403244
add esp, 0x28
jmp 0x403070
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor esi, esi
push esi
push esi
push esi
push esi
mov ebx, eax
push str.Preloader
mov dword [esp + 0x38], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebp, eax
mov dword [esp + 0x20], ebp
cmp ebp, esi
je 0x403473
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
push 2
push esi
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x2c]
push eax
push ebp
mov dword [esp + 0x30], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], 0x45bf18
call fcn.00403010
add esp, 0x1c
test al, al
je 0x403451
cmp dword [0xeea99c], esi
je 0x4032bc
mov byte [esp + 0xf], 1
jmp 0x403451
mov esi, dword [esp + 0x1c]
push edi
cmp esi, 2
jne 0x403446
mov edi, dword [esp + 0x18]
cmp edi, esi
jle 0x403446
mov ax, word [esp + 0x14]
cmp al, 0x4d
jne 0x403442
cmp ah, 0x5a
jne 0x403442
cmp word [0xee0920], 0
je 0x403303
push 0xee0920
call fcn.00401b80
add esp, 4
push edi
push 8
push ebx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x40343e
cmp edi, 2
mov cl, byte [esp + 0x14]
mov byte [ebx], cl
mov dl, byte [esp + 0x15]
mov byte [ebx + 1], dl
jle 0x4033a6
lea esp, [esp]
mov eax, edi
sub eax, esi
cmp eax, 0xc800
mov dword [esp + 0x20], 0
jle 0x403348
mov eax, 0xc800
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
push esi
lea eax, [ebx + esi]
push eax
lea ecx, [esp + 0x30]
push ecx
push ebp
call fcn.00403010
add esp, 0x1c
test al, al
je 0x40338e
cmp dword [0xeea99c], 0
jne 0x403398
add esi, dword [esp + 0x20]
cmp word [0xee0920], 0
je 0x40338e
push 0xee0920
call fcn.00401b80
add esp, 4
mov edi, dword [esp + 0x18]
cmp esi, edi
jl 0x403330
jmp 0x4033a6
push 0x18
call fcn.004019c0
mov edi, dword [esp + 0x1c]
add esp, 4
cmp esi, edi
jne 0x40342e
lea edx, [esp + 0x2c]
push edx
call fcn.00405400
add esp, 4
push str.__45_LoadedContent
push esi
push 0
push 4
lea eax, [esp + 0x3c]
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
lea ecx, [esp + 0x2c]
push ecx
mov ebp, eax
call fcn.00405360
push ebp
push 1
call fcn.00405380
add esp, 0xc
test ebp, ebp
je 0x40342a
push ebp
push 1
call fcn.00405380
add esp, 8
push 0
push 0
push 0
push 2
push ebp
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x40342a
push edi
push ebx
push ebp
call fcn.004054e0
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [0xeea94c], esi
mov byte [esp + 0x13], 1
mov ebp, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
push ebx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x403450
push 0x17
jmp 0x403448
push 0x19
jmp 0x403448
push 0x16
call fcn.004019c0
add esp, 4
pop edi
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [esp + 0x18]
push eax
push 0x45bf18
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov al, byte [esp + 0xf]
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push 9
call fcn.004019c0
mov al, byte [esp + 0x13]
add esp, 4
pop esi
pop ebp
pop ebx
add esp, 0x28
ret