Function at 0x4df120
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x90
push esi
mov esi, dword [esp + 0x98]
test esi, esi
jne 0x4df13c
xor eax, eax
pop esi
add esp, 0x90
ret
cmp byte [esi], 0
push ebx
push ebp
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
je 0x4df188
cmp byte [esi + 1], 0
je 0x4df180
push 2
push 0
push 0
push dword [esi + 4]
call edi
cmp byte [esi], 0
je 0x4df18e
cmp byte [esi + 1], 0
je 0x4df178
push 1
push 0
push 0
push dword [esi + 4]
call edi
mov ecx, eax
sub ecx, dword [esi + 0xc]
jmp 0x4df191
xor ecx, ecx
mov dword [esp + 0x14], ecx
jmp 0x4df1a2
or ebp, 0xffffffff
jmp 0x4df29f
mov eax, dword [esi + 0x18]
mov dword [esi + 0x1c], eax
mov ecx, dword [esi + 0x1c]
mov eax, 0xffff
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
cmp ecx, eax
jae 0x4df1a6
mov dword [esp + 0x18], ecx
push 0x404
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
or ebp, 0xffffffff
test edi, edi
je 0x4df299
mov ecx, dword [esp + 0x18]
mov ebx, 4
mov dword [esp + 0x10], ebp
cmp ecx, ebx
jbe 0x4df28f
mov edx, 0x404
nop dword [eax + eax]
lea eax, [ebx + 0x400]
mov ebx, ecx
cmp eax, ecx
mov ecx, dword [esp + 0x14]
cmovbe ebx, eax
sub ecx, ebx
mov ebp, ebx
cmp ebx, 0x404
mov dword [esp + 0x1c], ecx
cmova ebp, edx
cmp byte [esi], 0
je 0x4df222
cmp byte [esi + 1], 0
je 0x4df28b
mov eax, dword [esi + 0xc]
push 0
push 0
add eax, ecx
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4df225
mov dword [esi + 0x1c], ecx
push esi
push 1
push ebp
push edi
call fcn.004ded10
add esp, 0x10
cmp eax, 1
jne 0x4df28b
lea ecx, [ebp - 3]
test ecx, ecx
js 0x4df264
lea eax, [edi + 3]
add eax, ecx
mov edx, ecx
lea eax, [eax - 1]
dec ecx
cmp byte [eax - 3], 0x50
jne 0x4df260
cmp byte [edx + edi], 0x4b
jne 0x4df260
cmp byte [eax - 1], 5
jne 0x4df260
cmp byte [eax], 6
je 0x4df27f
test ecx, ecx
jns 0x4df243
mov ebp, dword [esp + 0x10]
test ebp, ebp
jne 0x4df28f
mov ecx, dword [esp + 0x18]
mov edx, 0x404
cmp ebx, ecx
jb 0x4df1e0
jmp 0x4df28f
mov ebp, dword [esp + 0x1c]
add ebp, ecx
mov dword [esp + 0x10], ebp
jmp 0x4df268
mov ebp, dword [esp + 0x10]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor ebx, ebx
cmp ebp, 0xffffffff
setne bl
dec ebx
cmp byte [esi], 0
je 0x4df2c9
cmp byte [esi + 1], 0
je 0x4df2c4
mov eax, dword [esi + 0xc]
push 0
push 0
add eax, ebp
push eax
push dword [esi + 4]
call edi
jmp 0x4df2cc
or ebx, 0xffffffff
jmp 0x4df2cc
mov dword [esi + 0x1c], ebp
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.004dfcc0
or edi, 0xffffffff
test eax, eax
lea eax, [esp + 0x1c]
push eax
push esi
cmovne ebx, edi
call fcn.004dfdc0
test eax, eax
lea eax, [esp + 0x28]
push eax
push esi
cmovne ebx, edi
call fcn.004dfdc0
test eax, eax
lea eax, [esp + 0x3c]
push eax
push esi
cmovne ebx, edi
call fcn.004dfdc0
test eax, eax
lea eax, [esp + 0x3c]
push eax
push esi
cmovne ebx, edi
call fcn.004dfdc0
add esp, 0x28
test eax, eax
mov eax, dword [esp + 0x1c]
cmovne ebx, edi
cmp eax, dword [esp + 0x24]
jne 0x4df33a
cmp dword [esp + 0x18], 0
jne 0x4df33a
cmp dword [esp + 0x14], 0
je 0x4df33f
mov ebx, 0xffffff99
lea eax, [esp + 0x40]
push eax
push esi
call fcn.004dfcc0
test eax, eax
lea eax, [esp + 0x4c]
push eax
push esi
cmovne ebx, edi
call fcn.004dfcc0
test eax, eax
lea eax, [esp + 0x38]
push eax
push esi
cmovne ebx, edi
call fcn.004dfdc0
mov edx, dword [esi + 0xc]
add esp, 0x18
test eax, eax
mov eax, dword [esp + 0x44]
cmovne ebx, edi
mov edi, dword [esp + 0x40]
lea ecx, [edx + ebp]
add eax, edi
cmp ecx, eax
jb 0x4df401
test ebx, ebx
jne 0x4df401
sub edx, edi
mov dword [esp + 0x20], esi
sub edx, dword [esp + 0x44]
add edx, ebp
mov dword [esp + 0x3c], ebp
push 0x80
mov dword [esp + 0x30], edx
mov dword [esp + 0xa0], ebx
mov dword [esi + 0xc], ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0
push 0
mov ebx, eax
lea esi, [esp + 0x2c]
push 0
push 0
push 0
push 0
lea eax, [ebx + 0x78]
mov ecx, 0x20
push eax
lea eax, [ebx + 0x28]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x24]
push eax
push ebx
mov dword [ebx + 0x14], ecx
mov dword [ebx + 0x10], 0
call fcn.004df900
add esp, 0x28
neg eax
sbb eax, eax
inc eax
pop edi
mov dword [ebx + 0x18], eax
mov eax, ebx
pop ebp
pop ebx
pop esi
add esp, 0x90
ret
cmp byte [esi + 0x10], 0
je 0x4df410
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x20
push esi
call fcn.004c6f6f
add esp, 8
xor eax, eax
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x90
ret