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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov ebx, dword [esp + 0xb4]
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x40e4aa
mov edx, dword [esp + 0xbc]
add edx, dword [esp + 0xc4]
cmp eax, edx
jl 0x40e612
mov ebp, dword [esp + 0xb4]
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x40e4ce
mov edx, dword [esp + 0xc0]
add edx, dword [esp + 0xc8]
cmp eax, edx
jl 0x40e5e8
mov eax, dword [esp + 0xc4]
test eax, eax
jle 0x40e605
mov ebp, dword [esp + 0xc8]
test ebp, ebp
jle 0x40e605
mov edx, dword [esp + 0xbc]
add edx, dword [esp + 0xc4]
mov esi, dword [esp + 0xc0]
add esi, dword [esp + 0xc8]
mov ebx, dword [esp + 0xb4]
mov eax, dword [ebx + 0x10]
cmp edx, eax
jg 0x40e63a
mov ebp, dword [esp + 0xb4]
mov ecx, dword [ebp + 0x14]
cmp esi, ecx
jg 0x40e63d
mov esi, dword [ebp + 0x3c]
lea ebx, [eax*4]
mov dword [esp + 0x70], ebx
mov ebx, dword [esp + 0xc0]
mov ebp, dword [esp + 0xb4]
cmp ebx, dword [ebp + 0x44]
jl 0x40eb72
je 0x40eb62
mov ebp, dword [esp + 0xb8]
mov ecx, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x18]
sub ebx, ecx
mov edx, ebp
mov ebp, dword [ebp + 0x1c]
sub ebp, ecx
mov edi, edx
mov edx, dword [edx + 0x20]
mov edi, dword [edi + 0x10]
mov dword [esp + 0x44], edi
cmp edx, edi
jge 0x40e625
test edx, edx
js 0x40e625
mov edi, dword [esp + 0xcc]
and edi, 0x10000000
mov dword [esp + 0x78], edi
sub edx, ecx
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0xcc]
and edx, 0xefffffff
mov dword [esp + 0x74], edx
test ebx, ebx
jne 0x40e695
test ebp, ebp
je 0x40ee0a
mov edx, dword [esp + 0xb4]
or dword [edx + 0xc], 1
imul eax, dword [esp + 0xc0]
add eax, dword [esp + 0xbc]
lea eax, [esi + eax*4]
mov dword [esp + 0x68], eax
jmp 0x40e6c3
sub eax, dword [esp + 0xc0]
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0xc4]
test eax, eax
jg 0x40e4dd
xor eax, eax
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
sub eax, dword [esp + 0xbc]
mov dword [esp + 0xc4], eax
jmp 0x40e4aa
mov dword [esp + 0x78], 1
mov dword [esp + 0x6c], 0
jmp 0x40e5a0
mov ecx, dword [ebx + 0x14]
mov ebp, dword [esp + 0xb8]
mov ebx, dword [ebp]
mov ebp, dword [esp + 0xb4]
mov edi, dword [ebp + 0x3c]
cmp ecx, esi
jge 0x40e657
mov ecx, esi
cmp edx, eax
jge 0x40e65d
mov edx, eax
mov eax, dword [esp + 0xb4]
call fcn.0040c704
dec eax
je 0x40edb7
cmp ebx, edi
mov ebx, dword [esp + 0xb4]
mov esi, dword [ebx + 0x3c]
je 0x40ee28
mov eax, dword [ebx + 0x10]
lea ebp, [eax*4]
mov dword [esp + 0x70], ebp
jmp 0x40e53a
mov edi, dword [esp + 0xb4]
or dword [edi + 0xc], 1
mov edx, dword [esp + 0xc0]
imul edx, eax
add edx, dword [esp + 0xbc]
lea edx, [esi + edx*4]
mov dword [esp + 0x68], edx
cmp dword [esp + 0x44], 4
je 0x40ed96
mov eax, dword [esp + 0xb8]
mov edx, dword [eax + 8]
xor eax, eax
cmp dword [esp + 0x74], 1
sete al
mov dword [esp + 0x64], eax
mov esi, dword [esp + 0xc4]
shl esi, 2
mov dword [esp + 0x7c], esi
mov edi, dword [esp + 0xc8]
mov dword [esp + 0x54], edi
jmp 0x40e71f
mov eax, dword [esp + 0x54]
test eax, eax
jle 0x40e9bc
mov eax, dword [esp + 0xb8]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x44], eax
mov edx, dword [esp + 0xb8]
mov ecx, dword [edx + 0x14]
mov edx, dword [edx + 8]
mov esi, dword [esp + 0xb8]
mov eax, dword [esi]
mov dword [esp + 0x48], edx
mov edi, dword [esp + 0x54]
cmp edx, edi
jle 0x40e738
mov dword [esp + 0x48], edi
mov edx, dword [esp + 0x48]
sub dword [esp + 0x54], edx
test edx, edx
jle 0x40e6f8
add ecx, eax
mov dword [esp + 0x60], ecx
cmp dword [esp + 0x44], 4
je 0x40eb92
mov edi, dword [esp + 0xb8]
mov eax, dword [edi + 4]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x50], edi
mov edx, dword [esp + 0xc4]
mov dword [esp + 0x40], edx
mov edi, dword [esp + 0x6c]
mov esi, ebx
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x40]
cmp eax, ecx
jle 0x40e788
mov dword [esp + 0x3c], ecx
mov ebx, dword [esp + 0x3c]
sub dword [esp + 0x40], ebx
test edi, edi
jne 0x40e7ec
test ebx, ebx
jle 0x40e7d1
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x60]
mov ecx, ebx
nop
mov bl, byte [edx]
mov byte [eax], bl
mov bl, byte [edx + esi]
mov byte [eax + 1], bl
mov bl, byte [edx + ebp]
mov byte [eax + 2], bl
mov byte [eax + 3], 0xff
add eax, 4
add edx, dword [esp + 0x44]
dec ecx
jne 0x40e7a4
mov ebx, dword [esp + 0x50]
mov ecx, dword [esp + 0x3c]
lea ebx, [ebx + ecx*4]
mov dword [esp + 0x50], ebx
mov eax, dword [esp + 0x40]
test eax, eax
jle 0x40e98c
mov ebx, dword [esp + 0xb8]
mov eax, dword [ebx + 4]
jmp 0x40e778
mov eax, dword [esp + 0x64]
test eax, eax
jne 0x40eb14
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x40e7d1
mov ebx, dword [esp + 0x50]
add ebx, 4
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], ebp
mov esi, ecx
jmp 0x40e91e
test edi, edi
je 0x40e911
mov ebp, 0xff
sub ebp, edi
imul ebp, eax
mov eax, 0x80808081
imul ebp
add edx, ebp
sar edx, 7
sar ebp, 0x1f
sub edx, ebp
mov dword [esp + 0x34], edx
movzx ebp, byte [ebx - 4]
imul ebp, edx
mov eax, 0x80808081
imul ebp
add edx, ebp
sar edx, 7
sar ebp, 0x1f
sub edx, ebp
mov dword [esp + 0x38], edx
movzx ebp, byte [esi]
imul ebp, edi
mov eax, 0x80808081
imul ebp
add ebp, edx
sar ebp, 7
mov al, byte [esp + 0x38]
add eax, ebp
mov byte [ebx - 4], al
movzx ebp, byte [ebx - 3]
imul ebp, dword [esp + 0x34]
mov eax, 0x80808081
imul ebp
add edx, ebp
sar edx, 7
sar ebp, 0x1f
sub edx, ebp
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x58]
movzx ebp, byte [esi + edx]
imul ebp, edi
mov eax, 0x80808081
imul ebp
add ebp, edx
sar ebp, 7
mov al, byte [esp + 0x38]
add eax, ebp
mov byte [ebx - 3], al
movzx ebp, byte [ebx - 2]
imul ebp, dword [esp + 0x34]
mov eax, 0x80808081
imul ebp
add edx, ebp
sar edx, 7
sar ebp, 0x1f
sub edx, ebp
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x5c]
movzx ebp, byte [esi + edx]
imul ebp, edi
mov eax, 0x80808081
imul ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
add ebp, edx
sar ebp, 7
mov al, byte [esp + 0x38]
add eax, ebp
mov byte [ebx - 2], al
add ecx, dword [esp + 0x34]
mov byte [ebx - 1], cl
add esi, dword [esp + 0x44]
add ebx, 4
dec dword [esp + 0x30]
je 0x40e965
mov edi, dword [esp + 0x4c]
mov cl, byte [esi + edi]
movzx edi, cl
cmp edi, 0xff
je 0x40e93c
movzx eax, byte [ebx - 1]
test al, al
jne 0x40e828
mov al, byte [esi]
mov byte [ebx - 4], al
mov edx, dword [esp + 0x58]
mov dl, byte [esi + edx]
mov byte [ebx - 3], dl
mov eax, dword [esp + 0x5c]
mov al, byte [esi + eax]
mov byte [ebx - 2], al
mov byte [ebx - 1], cl
add esi, dword [esp + 0x44]
add ebx, 4
dec dword [esp + 0x30]
jne 0x40e91e
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0x58]
mov ebp, dword [esp + 0x5c]
mov ebx, dword [esp + 0x50]
mov ecx, dword [esp + 0x3c]
lea ebx, [ebx + ecx*4]
mov dword [esp + 0x50], ebx
mov eax, dword [esp + 0x40]
test eax, eax
jg 0x40e7dd
mov ebx, esi
mov esi, dword [esp + 0xb8]
mov esi, dword [esi + 0xc]
add dword [esp + 0x60], esi
mov edi, dword [esp + 0x70]
add dword [esp + 0x68], edi
dec dword [esp + 0x48]
jne 0x40e74a
mov eax, dword [esp + 0x54]
test eax, eax
jg 0x40e704
nop
mov edi, dword [esp + 0x6c]
test edi, edi
je 0x40ed34
mov esi, dword [esp + 0x74]
test esi, esi
jne 0x40ec4d
mov ebx, dword [esp + 0xb4]
mov eax, dword [ebx + 0x10]
lea edx, [eax*4]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 4
imul eax, dword [esp + 0xc0]
mov edx, dword [esp + 0xbc]
add edx, eax
mov eax, dword [ebx + 0x3c]
lea eax, [eax + edx*4 + 3]
mov dword [esp + 0x14], eax
mov ebp, dword [esp + 0xc8]
mov dword [esp + 0x10], ebp
mov ebx, dword [esp + 0xc4]
mov dword [esp + 0xc], ebx
mov ebp, dword [esp + 0xc0]
mov dword [esp + 8], ebp
mov ebx, dword [esp + 0xbc]
mov dword [esp + 4], ebx
mov ebp, dword [esp + 0xb4]
mov eax, dword [ebp + 0x48]
mov dword [esp], eax
call fcn.00474de8
mov ebx, dword [esp + 0x78]
test ebx, ebx
jne 0x40ea61
cmp dword [esp + 0xc4], 1
je 0x40ecce
mov ecx, dword [esp + 0x6c]
test ecx, ecx
jne 0x40eb51
mov ebp, dword [esp + 0xb4]
test byte [ebp + 0xc], 4
jne 0x40eb51
mov ebx, dword [esp + 0xc8]
mov dword [esp + 0x10], ebx
mov ebp, dword [esp + 0xc4]
mov dword [esp + 0xc], ebp
mov ebx, dword [esp + 0xc0]
mov dword [esp + 8], ebx
mov ebp, dword [esp + 0xbc]
mov dword [esp + 4], ebp
mov ebx, dword [esp + 0xb4]
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 ebp, dword [esp + 0xc8]
mov dword [esp + 0x10], ebp
mov ebx, dword [esp + 0xc4]
mov dword [esp + 0xc], ebx
mov ebp, dword [esp + 0xc0]
mov dword [esp + 8], ebp
mov ebx, dword [esp + 0xbc]
mov dword [esp + 4], ebx
mov ebp, dword [esp + 0xb4]
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.0042e72c
xor eax, eax
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x40e7d1
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x3c]
mov bl, byte [eax]
mov byte [edx], bl
mov bl, byte [eax + esi]
mov byte [edx + 1], bl
mov bl, byte [eax + ebp]
mov byte [edx + 2], bl
mov bl, byte [eax + edi]
mov byte [edx + 3], bl
add edx, 4
add eax, dword [esp + 0x44]
dec ecx
jne 0x40eb2c
jmp 0x40e7c2
mov eax, dword [esp + 0xb4]
call fcn.00409394
jmp 0x40ea7e
mov ebx, dword [esp + 0xbc]
cmp ebx, dword [ebp + 0x40]
jge 0x40e557
mov ebx, dword [esp + 0xbc]
mov ebp, dword [esp + 0xb4]
mov dword [ebp + 0x40], ebx
mov ebx, dword [esp + 0xc0]
mov dword [ebp + 0x44], ebx
jmp 0x40e557
cmp ebx, 1
je 0x40ed1c
mov ecx, dword [esp + 0xb8]
mov eax, dword [ecx + 4]
jmp 0x40e75f
mov esi, dword [esp + 0xc4]
mov edx, dword [esp + 0xb8]
cmp esi, dword [edx + 4]
jg 0x40eec6
mov esi, dword [esp + 0xb8]
mov edx, dword [esi + 8]
cmp dword [esp + 0xc8], edx
jg 0x40e6cd
cmp dword [esp + 0xc8], 1
je 0x40ec12
mov esi, dword [esp + 0xbc]
test esi, esi
jne 0x40e6cd
cmp dword [esp + 0xc4], eax
jne 0x40e6cd
mov esi, dword [esp + 0x70]
mov eax, dword [esp + 0xb8]
cmp dword [eax + 0xc], esi
jne 0x40e6cd
cmp dword [esp + 0x74], 1
jne 0x40e6cd
mov eax, dword [esp + 0xc8]
imul eax, dword [esp + 0xc4]
shl eax, 2
mov dword [esp + 8], eax
mov ebp, dword [esp + 0xb8]
add ecx, dword [ebp]
mov dword [esp + 4], ecx
mov edi, dword [esp + 0x68]
mov dword [esp], edi
call sub.msvcrt.dll_memmove
call fcn.00474cd0
mov ebx, eax
mov edi, dword [esp + 0xbc]
mov word [esp + 0x88], di
mov ebp, dword [esp + 0xc0]
mov word [esp + 0x8a], bp
mov eax, dword [esp + 0xc4]
mov word [esp + 0x8c], ax
mov edx, dword [esp + 0xc8]
mov word [esp + 0x8e], dx
mov dword [esp + 8], ebx
mov dword [esp + 4], ebx
lea eax, [esp + 0x88]
mov dword [esp], eax
call fcn.00474d80
mov ebp, dword [esp + 0xb4]
mov eax, dword [ebp + 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 0x40e9d4
cmp dword [esp + 0xc8], 1
jne 0x40ea61
mov ebx, dword [esp + 0xb4]
mov eax, dword [ebx + 0xc]
test al, 4
jne 0x40ea7e
mov ecx, dword [esp + 0xc0]
imul ecx, dword [ebx + 0x10]
add ecx, dword [esp + 0xbc]
mov edx, dword [ebx + 0x3c]
mov dl, byte [edx + ecx*4 + 3]
dec edx
cmp dl, 0xfd
ja 0x40ea7e
or eax, 4
mov dword [ebx + 0xc], eax
jmp 0x40ea7e
cmp ebp, 2
je 0x40ee52
mov esi, dword [esp + 0xb8]
mov eax, dword [esi + 4]
jmp 0x40e75f
mov eax, dword [esp + 0xbc]
mov word [esp + 0x88], ax
mov edx, dword [esp + 0xc0]
mov word [esp + 0x8a], dx
mov ecx, dword [esp + 0xc4]
mov word [esp + 0x8c], cx
mov ebx, dword [esp + 0xc8]
mov word [esp + 0x8e], bx
mov ebp, dword [esp + 0xb4]
mov eax, dword [ebp + 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], eax
lea eax, [esp + 0x88]
mov dword [esp], eax
call fcn.00474d80
jmp 0x40ea4b
cmp ebx, 1
jne 0x40e6c3
cmp ebp, 2
je 0x40eeac
mov esi, dword [esp + 0xb8]
mov edx, dword [esi + 8]
jmp 0x40e6cd
mov edi, dword [esp + 0xb0]
test edi, edi
je 0x40ee48
mov eax, dword [esp + 0xb0]
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 + 0xb0]
mov dword [esp], edx
mov eax, dword [0x68bb7c]
call dword [eax + 0x120]
mov eax, 1
jmp 0x40eb07
imul eax, dword [esp + 0xc0]
add eax, dword [esp + 0xbc]
lea eax, [esi + eax*4]
mov dword [esp + 0x68], eax
jmp 0x40e6c3
mov ebp, dword [esp + 0xb8]
mov dword [ebp], esi
mov eax, dword [ebx + 0x10]
lea ebx, [eax*4]
mov dword [esp + 0x70], ebx
mov dword [ebp + 0xc], ebx
jmp 0x40e53a
mov eax, 1
jmp 0x40eb07
cmp dword [esp + 0x6c], 3
jne 0x40e755
mov edx, dword [esp + 0xb8]
mov eax, dword [edx + 4]
cmp dword [esp + 0xc4], eax
jg 0x40e75f
mov edx, dword [esp + 0x64]
test edx, edx
je 0x40e75f
mov edi, dword [esp + 0x68]
mov esi, dword [esp + 0x60]
mov ecx, dword [esp + 0x7c]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xb8]
mov ecx, dword [ecx + 0xc]
add dword [esp + 0x60], ecx
mov esi, dword [esp + 0x70]
add dword [esp + 0x68], esi
jmp 0x40e9a4
cmp dword [esp + 0x6c], 3
je 0x40ebaa
mov edi, dword [esp + 0xb8]
mov edx, dword [edi + 8]
jmp 0x40e6cd
mov edx, dword [edx + 8]
jmp 0x40e6cd