Function at 0x40e380
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53d658
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x590a50]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx + 0x2a0], 2
jne 0x40e93a
lea eax, [ebp - 0x218]
push eax
call fcn.00403e70
add esp, 4
xor edi, edi
mov dword [ebp - 4], edi
push 0x56910e
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x220], 0x780
mov dword [ebp - 0x224], 0x438
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x230], edi
call fcn.00403db0
push 1
push edi
push edi
push 0x56a8e8
push 4
push edi
push edi
push 1
lea ecx, [ebp - 0x214]
mov byte [ebp - 4], 1
call fcn.0042978b
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x218]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x104
or eax, ecx
jge 0x40e453
push 0x104
lea ecx, [ebp - 0x218]
call fcn.004014e0
mov edx, dword [ebp - 0x218]
lea ecx, [ebp - 0x214]
mov esi, edx
call fcn.00439307
lea ecx, [ebp - 0x214]
mov dword [eax + 0x1c], esi
call fcn.00439307
lea ecx, [ebp - 0x214]
mov dword [eax + 0x20], 0x104
call fcn.00429fac
test eax, eax
je 0x40e4cc
lea ecx, [ebp - 0x22c]
push ecx
lea ecx, [ebp - 0x214]
call fcn.0042a0f9
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 3
call fcn.00403850
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e4cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x218]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.005155ce
add esp, 8
cmp eax, edi
jl 0x40e930
mov ecx, dword [ebp - 0x218]
cmp eax, dword [ecx - 8]
jg 0x40e930
mov dword [ecx - 0xc], eax
mov ecx, dword [ebp - 0x218]
mov byte [eax + ecx], 0
mov edx, dword [ebp - 0x21c]
push 0x5697fc
push edx
call fcn.00514f50
add esp, 8
cmp eax, edi
jne 0x40e582
lea ecx, [ebp - 0x214]
mov byte [ebp - 4], 1
call fcn.00429609
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e550
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x218]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eb5b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40eb5b
mov eax, dword [ebp - 0x218]
mov edx, dword [eax - 8]
mov ecx, 1
sub ecx, dword [eax - 4]
or edx, ecx
jge 0x40e5a9
push edi
lea ecx, [ebp - 0x218]
call fcn.004014e0
mov eax, dword [ebp - 0x218]
lea ecx, [ebp - 0x230]
push ecx
lea edx, [ebp - 0x228]
push edx
lea ecx, [ebp - 0x224]
push ecx
lea edx, [ebp - 0x220]
push edx
push eax
call dword [sym.imp.PNG_16.dll_int___cdecl_PNG_GetImageInfo_char___int___int___int___int__]
mov ecx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x224]
mov word [ebx + 0xee], ax
mov word [ebx + 0xec], cx
movzx eax, ax
movzx ecx, cx
imul eax, ecx
lea esi, [eax + eax*2]
push esi
mov byte [ebx + 0xf0], 1
mov byte [ebx + 0x14e], 2
call fcn.00515138
push esi
push 0
push eax
mov dword [ebx + 0x1b0], eax
call fcn.00516ee0
mov edx, dword [ebp - 0x218]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, dword [edx - 4]
add esp, 0x24
or ecx, eax
jge 0x40e640
push 0
lea ecx, [ebp - 0x218]
call fcn.004014e0
mov edx, dword [ebp - 0x218]
mov eax, dword [ebp - 0x224]
imul eax, dword [ebp - 0x220]
mov ecx, dword [ebx + 0x1b0]
add eax, eax
push eax
push ecx
push edx
call dword [sym.imp.PNG_16.dll_int___cdecl_PNG_Read_char___unsigned_char___int_]
mov edx, dword [ebp - 0x224]
imul edx, dword [ebp - 0x220]
add esp, 0xc
xor eax, eax
test edx, edx
jle 0x40e692
mov esi, dword [ebx + 0x1b0]
mov cl, byte [esi + eax*2]
mov byte [esi + eax], cl
mov edx, dword [ebp - 0x224]
imul edx, dword [ebp - 0x220]
inc eax
cmp eax, edx
jl 0x40e674
mov esi, dword [ebx + 0xbc]
test esi, esi
je 0x40e6b5
push esi
call fcn.00401f80
push esi
call fcn.004164a8
add esp, 4
mov dword [ebx + 0xbc], 0
push 0xb54
call fcn.0041646e
add esp, 4
mov dword [ebp - 0x22c], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x40e709
mov ecx, dword [ebx + 0x29c]
push ecx
mov ecx, dword [ebx + 0x2a0]
lea edx, [ebx + 0x5a4]
push edx
push ecx
lea edx, [ebx + 0x1ec]
push edx
sub esp, 0xa4
mov edi, esp
mov ecx, 0x29
lea esi, [ebx + 0xec]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00401ac0
jmp 0x40e70b
xor eax, eax
lea ecx, [ebp - 0x214]
mov dword [ebx + 0xbc], eax
mov byte [ebp - 4], 1
call fcn.00429609
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e746
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x218]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e76f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
movzx edx, word [ebx + 0xec]
movzx eax, word [ebx + 0xee]
imul eax, edx
lea esi, [eax + eax*2 + 0x400]
mov eax, dword [ebx + 0xbc]
mov dword [ebx + 0x1dc], 0
mov eax, dword [eax + 0xc]
push esi
mov dword [ebx + 0x190], eax
mov dword [ebx + 0xe8], 0
call fcn.00515138
mov edi, eax
push esi
mov dword [ebx + 0x194], edi
call fcn.00515138
push esi
mov dword [ebp - 0x228], eax
mov dword [ebx + 0x19c], eax
call fcn.00515138
push esi
mov dword [ebp - 0x230], eax
mov dword [ebx + 0x198], eax
call fcn.00515138
push esi
mov dword [ebp - 0x220], eax
mov dword [ebx + 0x1a8], eax
call fcn.00515138
push esi
mov dword [ebp - 0x21c], eax
mov dword [ebx + 0x1a4], eax
call fcn.00515138
mov dword [ebx + 0x1a0], eax
lea eax, [esi*4]
push eax
mov dword [ebp - 0x224], eax
call fcn.00515138
add esp, 0x1c
mov dword [ebx + 0x1ac], eax
test edi, edi
je 0x40eb27
cmp dword [ebp - 0x228], 0
je 0x40eb27
cmp dword [ebp - 0x230], 0
je 0x40eb27
cmp dword [ebp - 0x21c], 0
je 0x40eb27
cmp dword [ebp - 0x220], 0
je 0x40eb27
push esi
push 0
push edi
call fcn.00516ee0
mov ecx, dword [ebx + 0x19c]
push esi
push 0
push ecx
call fcn.00516ee0
mov edx, dword [ebx + 0x198]
push esi
push 0
push edx
call fcn.00516ee0
mov eax, dword [ebx + 0x1a4]
push esi
push 0
push eax
call fcn.00516ee0
mov ecx, dword [ebx + 0x1a0]
push esi
push 0
push ecx
call fcn.00516ee0
mov edx, dword [ebx + 0x1a8]
push esi
push 0
push edx
call fcn.00516ee0
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebx + 0x1ac]
add esp, 0x48
push eax
push 0
push ecx
call fcn.00516ee0
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
add esp, 0xc
push 0
push 0
push 1
push 0
call esi
push 0
push 0
push 1
push 0
mov dword [ebx + 0x1b4], eax
call esi
push ebx
push 0
push 0x414ce0
mov dword [ebx + 0x1b8], eax
call fcn.005153ae
push ebx
push 0
push 0x414ff0
call fcn.005153ae
mov edx, dword [ebx + 0x20]
add esp, 0x18
push 0
push 0x32
push 0
push edx
call dword [sym.imp.USER32.dll_SetTimer]
mov eax, 1
jmp 0x40eb5d
push 0x80070057
call fcn.00401580
call fcn.0040d070
mov edi, ebx
call fcn.00414190
push 4
call dword [sym.imp.USER32.dll_GetSystemMetrics]
xor esi, esi
cmp dword [ebx + 0xbc], esi
jne 0x40e95e
mov dword [ebx + 0xbc], esi
push 0xb54
call fcn.0041646e
add esp, 4
mov dword [ebp - 0x228], eax
mov dword [ebp - 4], 5
cmp eax, esi
je 0x40e9b7
mov ecx, dword [ebx + 0x29c]
push ecx
mov ecx, dword [ebx + 0x2a0]
lea edx, [ebx + 0x5a4]
push edx
push ecx
lea edx, [ebx + 0x1ec]
push edx
sub esp, 0xa4
mov edi, esp
lea esi, [ebx + 0xec]
mov ecx, 0x29
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00401ac0
xor esi, esi
jmp 0x40e9b9
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebx + 0xbc], eax
cmp dword [ebx + 0x2a0], esi
jne 0x40ead2
xor eax, eax
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], eax
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x250]
push 8
push ecx
mov dword [ebp - 0x22c], esi
mov dword [ebp - 0x250], esi
call dword [sym.imp.dtccm2.dll_EnumerateDevice]
mov dword [ebp - 0x21c], esi
add esp, 0xc
lea esi, [ebx + 0x204]
nop
mov ecx, dword [esi]
cmp dword [ecx - 0xc], 0
mov edi, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
je 0x40ea83
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x40ea5f
cmp dword [ecx - 8], 0
jl 0x40e930
mov dword [ecx - 0xc], 0
mov edx, dword [esi]
mov byte [edx], 0
jmp 0x40ea83
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ea75
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
add eax, 0x10
mov dword [esi], eax
mov edi, dword [ebp - 0x21c]
mov eax, dword [ebp + edi*4 - 0x250]
lea edi, [ebp + edi*4 - 0x250]
test eax, eax
je 0x40eab9
push eax
push 0x56a910
push esi
call fcn.00401650
mov ecx, dword [edi]
add esp, 0xc
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi], 0
mov eax, dword [ebp - 0x21c]
inc eax
add esi, 4
mov dword [ebp - 0x21c], eax
cmp eax, 8
jl 0x40ea30
push ecx
lea edx, [ebx + 0x204]
mov dword [ebp - 0x228], esp
mov ecx, esp
push edx
call fcn.00404770
mov esi, dword [ebx + 0xbc]
call fcn.00402140
mov ecx, dword [ebx + 0xbc]
call fcn.00402710
test eax, eax
jne 0x40e76f
mov eax, dword [ebx + 0xbc]
mov eax, dword [eax + 0x190]
push 0
push 0
push eax
call fcn.0041774d
mov ebx, dword [ebx + 0xbc]
mov ecx, dword [ebx + 8]
push ecx
jmp 0x40eb3f
push 0
push 0
push str.Memory_error_
call fcn.0041774d
mov ebx, dword [ebx + 0xbc]
mov eax, dword [ebx + 8]
push eax
call dword [sym.imp.dtccm2.dll_CloseDevice]
add esp, 4
cmp eax, 1
je 0x40eb5b
push 0
push 0
push str.Close_Device_failed__
call fcn.0041774d
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00514add
mov esp, ebp
pop ebp
ret