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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xbc
mov eax, dword [esp + 0xfc]
cmp dword [esp + 0xec], 1
je 0x40f610
mov ebx, eax
and ebx, 0x10000000
mov dword [esp + 0x88], ebx
and eax, 0xefffffff
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xec]
test eax, eax
jle 0x40f5d4
mov eax, dword [esp + 0xf0]
test eax, eax
jle 0x40f5d4
mov ebx, dword [esp + 0xd4]
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x40ef53
mov edx, dword [esp + 0xdc]
add edx, dword [esp + 0xe4]
cmp eax, edx
jge 0x40ef53
sub eax, dword [esp + 0xdc]
mov dword [esp + 0xe4], eax
mov ebx, dword [esp + 0xd4]
mov eax, dword [ebx + 0x1c]
test eax, eax
jne 0x40f5e4
mov eax, dword [esp + 0xe4]
test eax, eax
jle 0x40f5d4
mov eax, dword [esp + 0xe8]
test eax, eax
jle 0x40f5d4
mov edx, dword [esp + 0xdc]
add edx, dword [esp + 0xe4]
mov eax, dword [esp + 0xe0]
add eax, dword [esp + 0xe8]
mov ebx, dword [esp + 0xd4]
mov esi, dword [ebx + 0x10]
cmp edx, esi
jg 0x40f6f8
mov ebx, dword [esp + 0xd4]
mov ecx, dword [ebx + 0x14]
cmp eax, ecx
jle 0x40f63c
mov ebx, dword [esp + 0xd8]
mov edi, dword [ebx]
mov ebx, dword [esp + 0xd4]
mov ebp, dword [ebx + 0x3c]
cmp ecx, eax
jl 0x40f660
cmp edx, esi
jl 0x40f66a
mov eax, dword [esp + 0xd4]
call fcn.0040c704
dec eax
je 0x40f83c
cmp edi, ebp
je 0x40f9b2
mov ebx, dword [esp + 0xd8]
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0x48], ebx
mov ebx, dword [esp + 0xd4]
mov ebx, dword [ebx + 0x3c]
mov dword [esp + 0x54], ebx
mov ebx, dword [esp + 0xd4]
mov esi, dword [ebx + 0x10]
mov ebx, dword [esp + 0xd8]
mov ebx, dword [ebx]
mov dword [esp + 0x3c], ebx
lea ecx, [esi*4]
mov dword [esp + 0x8c], ecx
mov eax, dword [esp + 0xe0]
mov ebx, dword [esp + 0xd4]
cmp eax, dword [ebx + 0x44]
jl 0x40f6b8
je 0x40f6a6
mov ebx, dword [esp + 0xd8]
mov ecx, dword [ebx + 0x14]
mov eax, ebx
mov ebx, dword [ebx + 0x18]
sub ebx, ecx
mov edx, dword [eax + 0x1c]
sub edx, ecx
mov dword [esp + 0x78], edx
mov edx, eax
mov eax, dword [eax + 0x20]
mov ebp, dword [edx + 0x10]
cmp eax, ebp
jge 0x40f694
test eax, eax
js 0x40f694
mov edi, eax
sub edi, ecx
test ebx, ebx
jne 0x40f0a1
mov eax, dword [esp + 0x78]
test eax, eax
je 0x40f0ac
mov eax, dword [esp + 0xd4]
or dword [eax + 0xc], 1
mov edx, dword [esp + 0xf4]
imul edx, ebp
mov dword [esp + 0x90], edx
mov eax, dword [esp + 0xf8]
imul eax, dword [esp + 0x48]
mov dword [esp + 0x9c], eax
cmp dword [esp + 0xf4], 0
jle 0x40f794
mov eax, dword [esp + 0xf4]
mov edx, dword [esp + 0xd8]
add eax, dword [edx + 4]
dec eax
cdq
idiv dword [esp + 0xf4]
imul eax, dword [esp + 0xec]
mov dword [esp + 0x50], eax
cmp dword [esp + 0xf8], 0
jle 0x40f77e
mov eax, dword [esp + 0xf8]
mov edx, dword [esp + 0xd8]
add eax, dword [edx + 8]
dec eax
cdq
idiv dword [esp + 0xf8]
imul eax, dword [esp + 0xf0]
mov dword [esp + 0x58], eax
imul esi, dword [esp + 0xe0]
add esi, dword [esp + 0xdc]
mov edx, dword [esp + 0x54]
lea esi, [edx + esi*4]
mov dword [esp + 0x7c], esi
add ecx, dword [esp + 0x3c]
mov dword [esp + 0x94], ecx
mov esi, dword [esp + 0xf4]
test esi, esi
js 0x40f762
mov ecx, dword [esp + 0xf8]
test ecx, ecx
js 0x40f7aa
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x98], ebx
jmp 0x40f19c
mov eax, dword [esp + 0x40]
test eax, eax
jle 0x40f480
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x48], ebx
mov eax, dword [esp + 0x58]
cmp ebx, eax
jle 0x40f1b0
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x48]
sub dword [esp + 0x40], ecx
test ecx, ecx
jle 0x40f190
mov ebx, dword [esp + 0xf0]
mov dword [esp + 0x6c], ebx
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x84], ecx
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x70], ebx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x74], ecx
mov ebx, dword [esp + 0x74]
mov dword [esp + 0x64], ebx
mov ebx, dword [esp + 0xe4]
jmp 0x40f200
test ebx, ebx
jle 0x40f440
mov ebp, ebx
cmp ebx, dword [esp + 0x50]
jle 0x40f20c
mov ebp, dword [esp + 0x50]
sub ebx, ebp
test ebp, ebp
jle 0x40f1f8
mov esi, dword [esp + 0x84]
mov dword [esp + 0x5c], ebp
mov ebp, dword [esp + 0x98]
mov dword [esp + 0x80], ebx
mov ebx, dword [esp + 0x78]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x68], ecx
mov eax, dword [esp + 0xec]
cmp ecx, eax
jle 0x40f246
mov dword [esp + 0x68], eax
mov ecx, dword [esp + 0x64]
add ecx, 4
mov edx, dword [esp + 0x68]
mov dword [esp + 0x38], edx
jmp 0x40f3d5
movzx edx, al
mov dword [esp + 0x3c], edx
cmp edx, 0xff
je 0x40f3e4
cmp dword [esp + 0x60], 1
je 0x40f674
movzx eax, byte [ecx - 1]
test al, al
je 0x40f674
mov edx, dword [esp + 0x3c]
test edx, edx
je 0x40f3cc
mov edx, 0xff
sub edx, dword [esp + 0x3c]
imul eax, edx
mov dword [esp + 0x4c], eax
mov eax, 0x80808081
imul dword [esp + 0x4c]
mov eax, dword [esp + 0x4c]
add eax, edx
sar eax, 7
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x4c]
sar eax, 0x1f
sub dword [esp + 0x54], eax
movzx eax, byte [ecx - 4]
imul eax, dword [esp + 0x54]
mov dword [esp + 0x44], eax
mov eax, 0x80808081
imul dword [esp + 0x44]
mov eax, dword [esp + 0x44]
add eax, edx
sar eax, 7
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x44]
sar eax, 0x1f
sub dword [esp + 0x4c], eax
movzx edx, byte [esi]
imul edx, dword [esp + 0x3c]
mov dword [esp + 0x44], edx
mov eax, 0x80808081
imul edx
mov eax, dword [esp + 0x44]
add eax, edx
sar eax, 7
add eax, dword [esp + 0x4c]
mov byte [ecx - 4], al
movzx eax, byte [ecx - 3]
imul eax, dword [esp + 0x54]
mov dword [esp + 0x44], eax
mov eax, 0x80808081
imul dword [esp + 0x44]
mov eax, dword [esp + 0x44]
add eax, edx
sar eax, 7
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x44]
sar eax, 0x1f
sub dword [esp + 0x4c], eax
movzx edx, byte [esi + ebp]
imul edx, dword [esp + 0x3c]
mov dword [esp + 0x44], edx
mov eax, 0x80808081
imul edx
mov eax, dword [esp + 0x44]
add eax, edx
sar eax, 7
add eax, dword [esp + 0x4c]
mov byte [ecx - 3], al
movzx eax, byte [ecx - 2]
imul eax, dword [esp + 0x54]
mov dword [esp + 0x44], eax
mov eax, 0x80808081
imul dword [esp + 0x44]
mov eax, dword [esp + 0x44]
add eax, edx
sar eax, 7
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x44]
sar eax, 0x1f
sub dword [esp + 0x4c], eax
movzx edx, byte [esi + ebx]
imul edx, dword [esp + 0x3c]
mov dword [esp + 0x44], edx
mov eax, 0x80808081
imul edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x44]
add eax, edx
sar eax, 7
add eax, dword [esp + 0x4c]
mov byte [ecx - 2], al
mov al, byte [esp + 0x37]
add eax, dword [esp + 0x54]
mov byte [ecx - 1], al
nop
add ecx, 4
dec dword [esp + 0x38]
je 0x40f402
mov al, byte [esi + edi]
mov byte [esp + 0x37], al
test edi, edi
jne 0x40f25c
mov al, byte [esi]
mov byte [ecx - 4], al
mov dl, byte [esi + ebp]
mov byte [ecx - 3], dl
mov al, byte [esi + ebx]
mov byte [ecx - 2], al
mov byte [ecx - 1], 0xff
add ecx, 4
dec dword [esp + 0x38]
jne 0x40f3d5
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
lea eax, [eax + ecx*4]
mov dword [esp + 0x64], eax
add esi, dword [esp + 0x90]
mov edx, dword [esp + 0xec]
sub dword [esp + 0x5c], edx
mov eax, dword [esp + 0x5c]
test eax, eax
jg 0x40f22f
mov ebx, dword [esp + 0x80]
test ebx, ebx
jg 0x40f200
nop
mov eax, dword [esp + 0x74]
add eax, dword [esp + 0x8c]
dec dword [esp + 0x6c]
je 0x40f6d8
mov dword [esp + 0x74], eax
dec dword [esp + 0x70]
jne 0x40f1e5
mov eax, dword [esp + 0x48]
imul eax, dword [esp + 0x8c]
add dword [esp + 0x7c], eax
mov eax, dword [esp + 0x40]
test eax, eax
jg 0x40f19c
nop
test edi, edi
je 0x40f700
mov eax, dword [esp + 0x60]
test eax, eax
jne 0x40f88f
mov ebx, dword [esp + 0xd4]
mov eax, dword [ebx + 0x10]
lea edx, [eax*4]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 4
imul eax, dword [esp + 0xe0]
add eax, dword [esp + 0xdc]
mov edx, dword [ebx + 0x3c]
lea eax, [edx + eax*4 + 3]
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0xe8]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0xe4]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0xe0]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0xdc]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0xd4]
mov eax, dword [ebx + 0x48]
mov dword [esp], eax
call fcn.00474de8
mov eax, dword [esp + 0x88]
test eax, eax
jne 0x40f522
cmp dword [esp + 0xe4], 1
je 0x40f90b
test edi, edi
jne 0x40f533
mov ebx, dword [esp + 0xd4]
test byte [ebx + 0xc], 4
je 0x40f53f
mov eax, dword [esp + 0xd4]
call fcn.00409394
mov ebx, dword [esp + 0xe8]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0xe4]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0xe0]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0xdc]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0xd4]
mov dword [esp], ebx
call fcn.0040e3d4
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0xe8]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0xe4]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0xe0]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0xdc]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0xd4]
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042e72c
xor eax, eax
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0xe0]
add edx, dword [esp + 0xe8]
cmp eax, edx
jge 0x40ef65
sub eax, dword [esp + 0xe0]
mov dword [esp + 0xe8], eax
jmp 0x40ef65
cmp dword [esp + 0xf0], 1
je 0x40f7c6
mov ebx, eax
and ebx, 0x10000000
mov dword [esp + 0x88], ebx
and eax, 0xefffffff
mov dword [esp + 0x60], eax
jmp 0x40ef16
mov ebx, dword [esp + 0xd8]
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0x48], ebx
mov ebx, dword [esp + 0xd4]
mov ebx, dword [ebx + 0x3c]
mov dword [esp + 0x54], ebx
jmp 0x40f027
mov ecx, eax
cmp edx, esi
jge 0x40efe6
mov edx, esi
jmp 0x40efe6
mov dl, byte [esi]
mov byte [ecx - 4], dl
mov al, byte [esi + ebp]
mov byte [ecx - 3], al
mov dl, byte [esi + ebx]
mov byte [ecx - 2], dl
mov al, byte [esp + 0x37]
mov byte [ecx - 1], al
jmp 0x40f3cc
mov dword [esp + 0x88], 1
xor edi, edi
jmp 0x40f095
mov edx, dword [esp + 0xdc]
cmp edx, dword [ebx + 0x40]
jge 0x40f05f
nop
mov eax, dword [esp + 0xdc]
mov ebx, dword [esp + 0xd4]
mov dword [ebx + 0x40], eax
mov edx, dword [esp + 0xe0]
mov dword [ebx + 0x44], edx
jmp 0x40f05f
mov ecx, dword [esp + 0x9c]
add dword [esp + 0x84], ecx
mov ebx, dword [esp + 0xf0]
mov dword [esp + 0x6c], ebx
jmp 0x40f455
mov ecx, dword [ebx + 0x14]
jmp 0x40efc3
mov eax, dword [esp + 0xdc]
mov word [esp + 0xa8], ax
mov edx, dword [esp + 0xe0]
mov word [esp + 0xaa], dx
mov ecx, dword [esp + 0xe4]
mov word [esp + 0xac], cx
mov ebx, dword [esp + 0xe8]
mov word [esp + 0xae], bx
mov ebx, dword [esp + 0xd4]
mov eax, dword [ebx + 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], eax
lea eax, [esp + 0xa8]
mov dword [esp], eax
call fcn.00474d80
jmp 0x40f509
mov ecx, dword [esp + 0xd8]
mov ecx, dword [ecx + 4]
mov eax, ecx
dec eax
imul eax, ebp
add dword [esp + 0x94], eax
jmp 0x40f16c
jne 0x40f987
mov eax, dword [esp + 0xe8]
mov dword [esp + 0x58], eax
jmp 0x40f138
jne 0x40f95c
mov eax, dword [esp + 0xe4]
mov dword [esp + 0x50], eax
jmp 0x40f104
mov edx, dword [esp + 0xd8]
mov eax, dword [edx + 8]
dec eax
imul eax, dword [esp + 0x48]
add dword [esp + 0x94], eax
jmp 0x40f17b
cmp dword [esp + 0xf4], 1
jne 0x40f61e
cmp dword [esp + 0xf8], 1
jne 0x40f61e
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0xe8]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0xe4]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0xe0]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0xdc]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0xd8]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0xd4]
mov dword [esp + 4], ebx
mov eax, dword [esp + 0xd0]
mov dword [esp], eax
call fcn.0040e47c
jmp 0x40f5d6
mov eax, dword [esp + 0xd0]
test eax, eax
je 0x40f9f5
mov eax, dword [esp + 0xd0]
mov dword [esp], eax
mov eax, dword [0x68bb7c]
call dword [eax + 0x36c]
mov dword [esp + 8], 0
mov dword [esp + 4], str.not_enough_free_memory_for_image_buffer
mov edx, dword [esp + 0xd0]
mov dword [esp], edx
mov eax, dword [0x68bb7c]
call dword [eax + 0x120]
mov eax, 1
jmp 0x40f5d6
call fcn.00474cd0
mov ebx, eax
mov eax, dword [esp + 0xdc]
mov word [esp + 0xa8], ax
mov edx, dword [esp + 0xe0]
mov word [esp + 0xaa], dx
mov ecx, dword [esp + 0xe4]
mov word [esp + 0xac], cx
mov word [esp + 0xae], 1
mov dword [esp + 8], ebx
mov dword [esp + 4], ebx
lea eax, [esp + 0xa8]
mov dword [esp], eax
call fcn.00474d80
mov edx, dword [esp + 0xd4]
mov eax, dword [edx + 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00474f78
mov dword [esp], ebx
call fcn.00474cf4
jmp 0x40f494
cmp dword [esp + 0xe8], 1
jne 0x40f522
mov ebx, dword [esp + 0xd4]
mov eax, dword [ebx + 0xc]
test al, 4
jne 0x40f53f
mov ecx, dword [esp + 0xe0]
imul ecx, dword [ebx + 0x10]
add ecx, dword [esp + 0xdc]
mov edx, dword [ebx + 0x3c]
mov dl, byte [edx + ecx*4 + 3]
dec edx
cmp dl, 0xfd
ja 0x40f53f
or eax, 4
mov dword [ebx + 0xc], eax
jmp 0x40f53f
mov eax, dword [esp + 0xf4]
mov edx, dword [esp + 0xd8]
sub eax, dword [edx + 4]
inc eax
cdq
idiv dword [esp + 0xf4]
imul eax, dword [esp + 0xec]
mov dword [esp + 0x50], eax
jmp 0x40f104
mov eax, dword [esp + 0xf8]
mov edx, dword [esp + 0xd8]
sub eax, dword [edx + 8]
inc eax
cdq
idiv dword [esp + 0xf8]
imul eax, dword [esp + 0xf0]
mov dword [esp + 0x58], eax
jmp 0x40f138
mov ebx, dword [esp + 0xd4]
mov ebx, dword [ebx + 0x3c]
mov dword [esp + 0x3c], ebx
mov eax, dword [esp + 0xd8]
mov dword [eax], ebx
mov ebx, dword [esp + 0xd4]
mov esi, dword [ebx + 0x10]
lea ecx, [esi*4]
mov dword [esp + 0x48], ecx
mov dword [eax + 0xc], ecx
mov dword [esp + 0x8c], ecx
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x54], ebx
jmp 0x40f042
mov eax, 1
jmp 0x40f5d6