Function at 0x421190
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x58
push ebx
push ebp
mov ebp, dword [esp + 0x64]
push esi
mov esi, dword [esp + 0x80]
push edi
mov eax, dword [ebp + 0x3638]
xor edi, edi
mov dword [esp + 0x1c], eax
mov al, byte [ebp + 0xd0]
test al, al
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
je 0x4211f3
mov ecx, esi
mov eax, dword [0x550c90]
and ecx, 0x7ff
mov edx, esi
neg ecx
sbb ecx, ecx
push 0xffffffffffffff80
neg ecx
shr edx, 0xb
add eax, ecx
mov dword [0x548c60], edi
lea ecx, [edx + eax - 1]
push ecx
call fcn.0041eff0
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [esp + 0x78]
cmp ebx, edi
je 0x4212d7
mov eax, esi
xor ecx, ecx
and eax, 0x7ff
or eax, ecx
je 0x421218
mov edi, 1
mov edx, dword [esp + 0x88]
mov ecx, 0xb
mov eax, esi
call fcn.004b7b40
mov edx, dword [esp + 0xac]
mov ecx, dword [esp + 0xa4]
mov esi, eax
mov eax, dword [esp + 0xa8]
push edx
mov edx, dword [esp + 0xa4]
push eax
mov eax, dword [esp + 0xa4]
push ecx
mov ecx, dword [esp + 0xa4]
push edx
mov edx, dword [esp + 0xa4]
push eax
mov eax, dword [esp + 0xa4]
push ecx
mov ecx, dword [esp + 0xa4]
push edx
mov edx, dword [0x550c90]
add esi, edi
push eax
push ecx
push esi
push ebx
push edx
push ebp
call fcn.00416ed0
add esp, 0x34
cmp eax, esi
jne 0x4218bc
mov ecx, dword [esp + 0x70]
mov eax, esi
test ecx, ecx
je 0x4212b8
shl eax, 0xb
cdq
push edx
push eax
call dword [ecx + 4]
mov eax, dword [0x550c90]
add esp, 8
add eax, esi
mov dword [0x550c90], eax
jmp 0x4218cf
shl eax, 0xb
cdq
push edx
push eax
call fcn.00474a20
mov eax, dword [0x550c90]
add esp, 8
add eax, esi
mov dword [0x550c90], eax
jmp 0x4218cf
mov eax, dword [esp + 0x7c]
cmp eax, edi
mov edi, dword [esp + 0x88]
ja 0x42135a
mov eax, dword [ebp + 0x3630]
mov ebx, dword [esp + 0x80]
test eax, eax
je 0x4212fb
mov dword [esp + 0x14], ebx
push ebx
call fcn.00487f60
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne 0x421324
push ebx
call fcn.00486880
add esp, 4
mov dword [0x5de0a4], 0xa
jmp 0x4218cf
push eax
call fcn.00488190
add esp, 4
cmp esi, eax
jne 0x421335
cmp edi, edx
je 0x42135a
push str.File_size_changed.
push 0xd3
mov dword [0x5de0a4], 4
call fcn.004a6ea0
push eax
call fcn.00486770
push ebx
jmp 0x4218b4
xor eax, eax
mov dword [esp + 0x84], esi
or esi, edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x88], edi
je 0x4218cf
mov ebp, dword [esp + 0x70]
test ebp, ebp
je 0x421396
mov eax, dword [ebp + 0x18]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x421830
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x4214ce
test byte [esp + 0xac], 1
je 0x4214ce
mov edx, dword [esp + 0xa4]
mov esi, dword [esp + 0xa0]
mov eax, dword [esp + 0xa8]
mov ecx, edx
shr esi, 0x10
shl ecx, 0x10
shr edx, 0x10
shl eax, 0x10
or esi, ecx
or edx, eax
xor ebp, ebp
mov dword [esp + 0x40], 2
mov dword [esp + 0x44], 7
mov dword [esp + 0x48], 0xb
mov dword [esp + 0x4c], 0x15
mov dword [esp + 0x50], 0x26
mov dword [esp + 0x54], 0x2b
mov dword [esp + 0x58], 0x2f
mov dword [esp + 0x5c], 0x38
mov dword [esp + 0x60], 0x39
mov dword [esp + 0x64], 0x3d
mov dword [esp + 0x2c], 0xd
mov dword [esp + 0x30], 0x1d
mov dword [esp + 0x34], 0x29
mov dword [esp + 0x38], 0x95
mov dword [esp + 0x3c], 0xe5
xor edi, edi
lea ebx, [esp + 0x40]
mov ecx, dword [ebx]
cmp ecx, 0xffffffff
je 0x421485
cmp ecx, 0x20
jge 0x42146a
mov eax, esi
jmp 0x42146f
mov eax, edx
sub ecx, 0x20
shr eax, cl
lea ecx, [ebp + ebp]
add ebx, 4
and eax, 1
or eax, ecx
inc edi
cmp edi, 0xa
mov ebp, eax
jl 0x42145a
xor edi, edi
lea esi, [esp + 0x2c]
mov ecx, dword [esi]
cmp ecx, 0xffffffff
je 0x4214ca
mov eax, ebp
xor edx, edx
div ecx
imul eax, ecx
cmp eax, ebp
je 0x4214aa
inc edi
add esi, 4
cmp edi, 5
jl 0x42148b
jmp 0x4214ca
cmp byte [0x59ad5c], 0x66
je 0x4214ca
mov eax, dword [0x58d26c]
test eax, eax
jne 0x4214ca
cmp byte [esp + 0xac], 0x18
je 0x42183f
mov ebp, dword [esp + 0x70]
mov eax, dword [esp + 0x88]
test eax, eax
ja 0x4214e8
mov ebx, dword [esp + 0x84]
cmp ebx, 0x7fff
jbe 0x4214ed
mov ebx, 0x8000
mov esi, ebx
and esi, 0x800007ff
jns 0x4214ff
dec esi
or esi, 0xfffff800
inc esi
mov eax, ebx
lea ecx, [ebx + 0x7ff]
neg esi
cdq
sbb esi, esi
and edx, 0x7ff
add eax, edx
and ecx, 0xfffff800
neg esi
sar eax, 0xb
add esi, eax
xor eax, eax
mov edi, 0x548c80
shr ecx, 2
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x42156a
mov edi, dword [esp + 0x6c]
cmp dword [edi + 0x3630], 1
je 0x42159d
lea edx, [esp + 0x20]
push 0
push edx
push ebx
push 0x548c80
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42184e
cmp dword [esp + 0x20], ebx
jne 0x42184e
jmp 0x42159d
mov eax, dword [esp + 0x6c]
cmp dword [eax + 0x3630], 1
je 0x421599
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x7c]
push esi
add ecx, edx
push 0x548c80
push ecx
push eax
call fcn.00416ca0
add esp, 0x10
cmp eax, esi
jne 0x4218bc
mov edi, dword [esp + 0x6c]
cmp dword [edi + 0x3630], 1
jne 0x42166f
mov eax, dword [esp + 0x14]
test eax, eax
mov eax, ebx
cdq
jne 0x4215f4
cmp dword [esp + 0x84], eax
jne 0x4215ce
cmp dword [esp + 0x88], edx
jne 0x4215ce
mov eax, 1
jmp 0x4215d0
xor eax, eax
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
add eax, ecx
push esi
push eax
push edx
call fcn.0041b600
add esp, 0x10
test eax, eax
je 0x42186a
jmp 0x421657
mov edi, eax
mov eax, dword [esp + 0x84]
cmp eax, edi
mov ebp, edx
jne 0x421613
cmp dword [esp + 0x88], ebp
jne 0x421613
mov eax, 1
jmp 0x421615
xor eax, eax
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x2c]
push ebx
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
call fcn.0041b660
add esp, 0x18
test eax, eax
je 0x421890
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
add ecx, edi
mov edi, dword [esp + 0x6c]
adc eax, ebp
mov ebp, dword [esp + 0x70]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x74]
mov edx, dword [0x550c90]
push ecx
push esi
push edx
push edi
call fcn.0041be00
add esp, 0x10
jmp 0x4216d4
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0xa4]
push eax
mov eax, dword [esp + 0xa4]
push ecx
mov ecx, dword [esp + 0xa4]
push edx
mov edx, dword [esp + 0xa4]
push eax
mov eax, dword [esp + 0xa4]
push ecx
mov ecx, dword [esp + 0xa4]
push edx
mov edx, dword [esp + 0xa4]
push eax
mov eax, dword [0x550c90]
push ecx
push edx
push esi
push 0x548c80
push eax
push edi
call fcn.00416ed0
add esp, 0x34
cmp eax, esi
jne 0x4218bc
mov edx, dword [0x550c90]
mov ecx, dword [esp + 0x84]
add edx, esi
mov eax, ebx
mov ebx, dword [esp + 0x88]
mov dword [0x550c90], edx
cdq
sub ecx, eax
mov eax, esi
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x10]
sbb ebx, edx
add ecx, esi
test ebp, ebp
mov dword [esp + 0x88], ebx
mov dword [esp + 0x10], ecx
je 0x421720
shl eax, 0xb
cdq
push edx
push eax
call dword [ebp + 4]
jmp 0x42172b
shl eax, 0xb
cdq
push edx
push eax
call fcn.00474a20
mov eax, dword [edi + 0xb8]
mov ebx, dword [edi + 0xc8]
add esp, 8
cmp eax, 2
jne 0x4217f1
test ebx, ebx
je 0x4217f1
mov eax, dword [ebx + 0x854]
test eax, eax
je 0x4217f1
mov eax, dword [ebx + 0x890]
lea ecx, [ebx + 4]
test ecx, ecx
je 0x4217f1
mov edi, dword [ebx + eax*4 + 4]
test edi, edi
je 0x4217ed
mov eax, dword [ebx + 0x8b0]
test eax, eax
je 0x4217ed
push str.Save_to:
push 0xaf
call fcn.004a6ea0
push eax
call fcn.004b721b
push edi
mov esi, eax
call fcn.004b721b
lea eax, [esi + eax + 1]
lea edx, [eax + eax]
push edx
call fcn.00487e70
mov esi, eax
add esp, 0x14
test esi, esi
je 0x4217e3
push str.Save_to:
push 0xaf
call fcn.004a6ea0
push eax
push esi
call fcn.004b71cd
push edi
push esi
call fcn.004b71a3
add esp, 0x18
test ebp, ebp
je 0x4217da
push esi
call dword [ebp + 0x10]
add esp, 4
push esi
call fcn.00487ea0
add esp, 4
mov dword [ebx + 0x8b0], 0
mov edi, dword [esp + 0x6c]
cmp dword [edi + 0x30], 1
jne 0x421815
mov eax, dword [edi + 0x2c]
add edi, 0x28
test eax, eax
jl 0x421815
jg 0x42180b
cmp dword [edi], 0x12c00000
jbe 0x421815
mov dword [0x5de0a4], 3
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x88]
or eax, ecx
jne 0x42137a
jmp 0x4218cf
mov dword [0x5de0a4], 1
jmp 0x4218cf
mov dword [0x5de0a4], 3
jmp 0x4218cf
mov ecx, dword [esp + 0x80]
mov dword [0x5de0a4], 4
push ecx
call fcn.00486880
add esp, 4
jmp 0x4218bc
push str.Out_of_memory._Program_abort.
push 0x64
mov dword [0x5de0a4], 6
call fcn.004a6ea0
push eax
call fcn.00486770
mov edx, dword [esp + 0x8c]
push edx
jmp 0x4218b4
push str.Out_of_memory._Program_abort.
push 0x64
mov dword [0x5de0a4], 6
call fcn.004a6ea0
push eax
call fcn.00486770
mov eax, dword [esp + 0x8c]
push eax
call fcn.00486880
add esp, 0x10
mov eax, dword [0x5de0a4]
test eax, eax
jne 0x4218cf
mov dword [0x5de0a4], 2
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00487eb0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret