Function at 0x40d950
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x274
mov ecx, dword [esp + 0x278]
mov eax, dword [0x47eff8]
push ebx
push ebp
mov ebp, ecx
push esi
xor esi, esi
and ebp, 0xffff
dec ebp
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ebp
cmp eax, esi
jne 0x40d98b
mov ebx, 0x1001fe
jmp 0x40df3f
cmp ebp, 0x7f
ja 0x40da1d
cmp dword [ebp*4 + 0x47e7f8], esi
je 0x40d9b0
test ecx, 0x20000000
je 0x40d9b0
or dword [ebp*4 + 0x47e9f8], 0x20000000
mov edi, ebp
imul edi, edi, 0x332
movsx ecx, word [edi + eax + 0x56]
movzx ebx, word [edi + eax + 0x54]
add edi, eax
mov eax, dword [ebp*4 + 0x47e7f8]
dec ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ecx
cmp eax, esi
jne 0x40db51
movzx ecx, word [edi + 0x52]
mov eax, ecx
and eax, 0x4000
mov edx, 0x4000
cmp ax, dx
jne 0x40da85
xor eax, eax
jmp 0x40da00
cmp word [eax*2 + 0x47d8e0], bx
jne 0x40da13
cmp dword [eax*4 + 0x47e7f8], esi
jne 0x40da27
inc eax
cmp eax, 0x80
jl 0x40da00
jmp 0x40da32
mov ebx, 0x100200
jmp 0x40df3f
mov ecx, dword [eax*4 + 0x47e7f8]
mov dword [esp + 0x10], ecx
cmp eax, 0x80
jne 0x40db40
mov eax, dword [str._xio_motion]
lea edx, [esp + 0x10]
push edx
push 3
push eax
call fcn.0041ad70
mov ebx, eax
add esp, 0xc
cmp ebx, esi
je 0x40db3c
cmp ebx, 0x1001ff
jne 0x40df3b
mov edx, dword [str._xio_motion]
lea ecx, [esp + 0x10]
push ecx
push edx
call fcn.0041a520
mov ebx, eax
add esp, 8
cmp ebx, esi
jmp 0x40db36
xor eax, eax
jmp 0x40da90
cmp word [eax*2 + 0x47d8e0], bx
jne 0x40daa3
cmp dword [eax*4 + 0x47e7f8], esi
jne 0x40daad
inc eax
cmp eax, 0x80
jl 0x40da90
jmp 0x40dab8
mov edx, dword [eax*4 + 0x47e7f8]
mov dword [esp + 0x10], edx
mov edx, ecx
and edx, 0x1000
mov esi, 0x1000
cmp dx, si
je 0x40dae6
and ecx, 0x2000
mov edx, 0x2000
cmp cx, dx
je 0x40dae6
mov esi, 0x46ec10
mov ecx, 4
jmp 0x40daf0
mov esi, str.__rl_F
mov ecx, 0xc
cmp eax, 0x80
jne 0x40db40
xor eax, eax
test ecx, ecx
jle 0x40db0d
mov edx, esi
nop
cmp bx, word [edx]
je 0x40db0d
inc eax
add edx, 6
cmp eax, ecx
jl 0x40db00
cmp eax, ecx
jne 0x40db1b
mov ebx, 0x100216
jmp 0x40df3f
lea ecx, [esp + 0x10]
push ecx
lea edx, [eax + eax*2]
mov eax, dword [esi + edx*2 + 2]
push 3
push eax
call fcn.0041ad70
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x40df3f
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov dword [ebp*4 + 0x47e7f8], ecx
mov ecx, dword [esp + 0x14]
jmp 0x40db55
mov dword [esp + 0x10], eax
mov ax, word [edi + 0x5a]
mov dx, word [edi + 0x58]
mov word [esp + 0x2a], ax
movzx eax, word [edi + 0x32]
mov word [esp + 0x26], cx
mov cx, word [edi + 0x3c]
mov word [esp + 0x24], bx
mov word [esp + 0x28], dx
mov word [esp + 0x2c], cx
mov word [esp + 0x2e], ax
cmp ax, 4
jne 0x40db95
mov eax, dword [edi + 6]
lea edx, [eax + eax*2]
mov dword [esp + 0x30], edx
jmp 0x40dba6
mov eax, dword [edi + 0x34]
push edi
push eax
call fcn.0040d7f0
add esp, 8
mov dword [esp + 0x30], eax
movzx edx, word [edi + 0x44]
movzx eax, word [edi + 0x46]
movzx ecx, word [edi + 0x42]
mov word [esp + 0x36], dx
movzx edx, byte [edi + 0x48]
mov word [esp + 0x38], ax
movzx eax, word [edi + 0x50]
mov word [esp + 0x3c], dx
movzx edx, word [edi + 0x52]
mov word [esp + 0x3e], ax
mov word [esp + 0x34], cx
movzx ecx, word [edi + 0x4e]
mov eax, 0xff
and dx, ax
movzx eax, word [edi + 0x240]
mov word [esp + 0x3a], cx
mov ecx, dword [edi + 0x5c]
mov dword [esp + 0x48], ecx
mov word [esp + 0x50], dx
test ax, ax
je 0x40dc9a
mov edx, dword [0x47eff8]
movzx ecx, ax
mov eax, ecx
and eax, 0xffff
dec eax
test edx, edx
jne 0x40dc23
mov ebx, 0x1001fe
jmp 0x40df3f
cmp eax, 0x7f
ja 0x40da1d
cmp dword [eax*4 + 0x47e7f8], 0
je 0x40dc49
test ecx, 0x20000000
je 0x40dc49
or dword [eax*4 + 0x47e9f8], 0x20000000
imul eax, eax, 0x332
mov cx, word [eax + edx + 0x54]
add eax, edx
mov dx, word [edi + 0x52]
mov word [esp + 0x52], cx
mov ecx, 0x1000
and dx, cx
cmp dx, cx
jne 0x40dc77
mov dx, word [eax + 0x5c]
mov word [esp + 0x54], dx
jmp 0x40dc82
mov ax, word [eax + 0x56]
dec ax
mov word [esp + 0x54], ax
movzx ecx, word [edi + 0x242]
push edi
push ecx
call fcn.0040d7f0
add esp, 8
mov word [esp + 0x56], ax
jmp 0x40dca8
xor edx, edx
xor eax, eax
mov word [esp + 0x52], dx
mov word [esp + 0x54], ax
movzx ecx, word [edi + 0x244]
movzx edx, word [edi + 0x276]
mov ax, word [edi + 0x246]
mov word [esp + 0x58], cx
movzx ecx, word [edi + 0x278]
mov word [esp + 0x5c], dx
movzx edx, word [edi + 0x22]
mov word [esp + 0x5a], ax
mov word [esp + 0x5e], cx
mov word [esp + 0x80], dx
test ax, ax
jne 0x40dcf3
mov eax, 0xa
mov word [esp + 0x5a], ax
movzx eax, word [edi + 0x32]
mov esi, dword [edi + 0x2e]
xor ebx, ebx
cmp ax, bx
jne 0x40dd24
mov ecx, dword [edi + 0x38]
push edi
push ecx
call fcn.0040d8c0
mov edx, dword [edi + 0x34]
add edx, dword [edi + 0x38]
push edi
push edx
mov dword [esp + 0x50], eax
call fcn.0040d8c0
add esp, 0x10
jmp 0x40ddb8
cmp ax, 3
je 0x40dd3d
cmp ax, 5
je 0x40dd43
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
jmp 0x40ddbc
cmp ax, 5
jne 0x40dd57
call fcn.004177c0
mov dword [0x47f000], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
jmp 0x40ddbc
push 0x33450
xor eax, eax
push 0x57e40
push esi
mov word [esp + 0x3a], ax
call fcn.00417d30
mov edx, dword [0x47e3e0]
add esp, 0xc
cmp word [edx + 0x1f84a], 0
mov esi, eax
mov ecx, 0xfffdb228
mov ebx, 0x33838
je 0x40dda1
mov eax, dword [edx + 0x1f85a]
add eax, dword [edx + 0x1f84e]
sub ecx, eax
lea ebx, [eax + 0x33838]
push edi
push ecx
call fcn.0040d8c0
push edi
push ebx
mov dword [esp + 0x50], eax
call fcn.0040d8c0
add esp, 0x10
xor ebx, ebx
mov dword [esp + 0x44], eax
push edi
push esi
call fcn.0040d7f0
movzx ecx, word [edi + 0x24a]
push edi
push ecx
mov dword [esp + 0x5c], eax
call fcn.0040d7f0
mov edx, dword [edi + 0x284]
push edi
push edx
mov dword [esp + 0x78], eax
call fcn.0040d7f0
mov dword [esp + 0x7c], eax
movsx eax, word [edi + 0x282]
push edi
push eax
call fcn.0040d7f0
mov esi, dword [esp + 0x2a8]
lea ecx, [esp + 0xa6]
push ecx
push esi
mov dword [esp + 0x90], eax
mov dword [esp + 0xaa], esi
call fcn.00414220
add esp, 0x28
cmp eax, ebx
jne 0x40de3c
push ebx
push esi
call fcn.00414550
add esp, 8
mov dword [esp + 0x86], eax
mov dword [esp + 0x8a], ebx
jmp 0x40de4c
push eax
call fcn.004143d0
add esp, 4
mov dword [esp + 0x8a], eax
lea edx, [esp + 0x24]
push edx
push esi
push edi
call fcn.00410520
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x9c]
push edx
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x34]
push 0x600
push eax
mov dword [esp + 0xac], ecx
call fcn.0041a6e0
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x40de9c
cmp ebx, 0x100201
jne 0x40df3b
jmp 0x40dea4
cmp ebx, 0x100201
jne 0x40deac
mov dword [esp + 0x1c], 1
xor eax, eax
cmp dword [edi + 0x60], eax
lea ecx, [edi + 0x60]
je 0x40def9
xor esi, esi
lea ebx, [esp + 0xa4]
mov ebp, ecx
mov ecx, dword [ebp + 8]
movq xmm0, qword [ebp]
movq qword [ebx], xmm0
mov dword [ebx + 8], ecx
mov ecx, dword [ebx]
test ecx, ecx
je 0x40deee
push edi
push ecx
call fcn.0040d7f0
mov dword [ebx], eax
inc esi
add esp, 8
add ebp, 0xc
add ebx, 0xc
cmp esi, 0x28
jl 0x40dec1
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x288]
cmp dword [esp + 0x1c], 0
mov edx, dword [esp + 0x10]
mov cx, word [esp + 0x18]
mov dword [ebp*4 + 0x47dbe0], eax
mov eax, dword [esp + 0x14]
mov dword [ebp*4 + 0x47e7f8], edx
mov dword [ebp*4 + 0x47d6e0], eax
mov word [ebp*2 + 0x47d8e0], cx
mov edx, dword [edi + 0x2e]
mov dword [ebp*4 + 0x47dde0], edx
jne 0x40df63
call fcn.0040d5a0
mov ebx, eax
test ebx, ebx
je 0x40df56
mov eax, dword [0x47f004]
test eax, eax
je 0x40df56
mov ecx, dword [esp + 0x288]
push ebx
push ecx
call eax
add esp, 8
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x274
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x274
ret