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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
xor eax, eax
mov dword [esp + 0xc], edx
push ebx
mov ebx, ecx
mov dword [esp + 0x4c], eax
push esi
mov dword [esp + 0x38], eax
mov byte [esp + 0xf], al
mov dword [esp + 0x58], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x5c], eax
mov eax, dword [ebx]
push edi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x28], eax
call fcn.10047187
mov edx, dword [esp + 0x18]
mov edi, eax
test byte [edx + 0x24], 0x20
movsx esi, word [edx + 0x2a]
mov dword [esp + 0x14], esi
jne 0x1003fb3e
xor eax, eax
mov dword [esp + 0x4c], 1
mov dword [esp + 0x20], eax
jmp 0x1003fb53
mov ecx, edx
call fcn.100359e4
mov dword [esp + 0x20], eax
movzx eax, word [eax + 0x32]
mov dword [esp + 0x4c], eax
xor eax, eax
test esi, esi
jle 0x1003fc7e
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x44], eax
mov eax, ecx
lea esi, [ecx + 1]
not eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x38], eax
lea ecx, [eax + esi]
movsx eax, word [edx + 0x28]
cmp ecx, eax
je 0x1003fc53
cmp dword [ebp + 0x2c], 0
je 0x1003fb9b
mov eax, dword [esp + 0x44]
xor ecx, ecx
cmp dword [eax], ecx
jl 0x1003fc53
mov eax, dword [esp + 0x1c]
add edx, 4
mov ecx, dword [edx]
mov cl, byte [eax + ecx + 0xc]
movzx ebx, cl
mov dword [esp + 0x58], ebx
mov ebx, dword [esp + 0x34]
test cl, cl
je 0x1003fded
mov ch, byte [ebp + 0x20]
cmp ch, 0xb
jne 0x1003fbc7
cmp cl, ch
je 0x1003fbf5
cmp byte [ebp + 0x20], 0xb
movzx ecx, ch
cmove ecx, dword [esp + 0x58]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x40], edx
cmp ecx, 5
jne 0x1003fc07
mov esi, dword [edx]
mov dword [esp + 0x40], edx
mov dword [esp + 0x30], ecx
cmp dword [eax + esi + 4], 0
mov esi, dword [esp + 0x24]
jne 0x1003fc07
push 2
pop eax
mov dword [esp + 0x30], eax
xor eax, eax
mov dword [esp + 0x2c], eax
jmp 0x1003fd78
mov edx, dword [esp + 0x40]
xor eax, eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x2c], eax
sub ecx, 1
je 0x1003fd86
sub ecx, 1
je 0x1003fd78
sub ecx, 1
je 0x1003fd86
push 2
pop eax
sub ecx, eax
je 0x1003fd24
xor eax, eax
mov ecx, edi
push eax
push dword [ebp + 0x24]
push esi
push 0x32
pop edx
call fcn.1001d593
add esp, 0xc
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add eax, 0x10
push 4
pop ecx
add dword [esp + 0x44], ecx
inc esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x38]
add eax, esi
mov dword [esp + 0x24], esi
cmp eax, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
jl 0x1003fb78
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x38], ecx
test ecx, ecx
je 0x1003fe57
mov eax, dword [esp + 0x28]
xor edx, edx
mov eax, dword [eax + 0x20]
and eax, 0x200
or eax, edx
jne 0x1003fe57
mov eax, dword [ebp + 0x14]
cmp byte [ebp + 0x20], 0xb
not eax
mov dword [ebx + 0x34], eax
movzx eax, byte [ebp + 0x20]
push 2
pop esi
cmovne esi, eax
xor eax, eax
mov dword [esp + 0x40], eax
cmp dword [ecx], eax
jle 0x1003fe50
lea eax, [ecx + 8]
mov dword [esp + 0x44], eax
mov edx, dword [ebp + 0x2c]
mov ecx, dword [eax - 4]
mov dword [esp + 0x58], ecx
test edx, edx
je 0x1003fcf3
movzx eax, byte [ebp + 0x1c]
push eax
call fcn.1003fa98
pop ecx
test eax, eax
je 0x1003fe30
mov ecx, dword [esp + 0x58]
dec dword [ebx + 0x38]
mov eax, dword [ebx + 0x38]
push 0x10
push eax
push ecx
push ebx
mov dword [esp + 0x68], eax
call fcn.1003051a
add esp, 0x10
push 4
pop eax
cmp esi, eax
jne 0x1003fdf6
mov edx, dword [ebp + 0x24]
mov ecx, edi
call fcn.1001d5ec
jmp 0x1003fe25
dec dword [ebx + 0x38]
xor ecx, ecx
mov eax, dword [ebx + 0x38]
push ecx
push eax
push esi
push 0x33
pop edx
mov ecx, edi
mov dword [esp + 0x38], eax
call fcn.1001d593
mov edx, dword [esp + 0x4c]
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov ecx, ebx
mov edx, dword [edx]
push esi
mov edx, dword [eax + edx + 4]
call fcn.100301cf
pop ecx
xor eax, eax
mov ecx, edi
push eax
mov eax, dword [esp + 0x30]
push eax
push esi
push 0x33
pop edx
call fcn.1001d593
mov edx, dword [esp + 0x4c]
add esp, 0xc
push 2
pop eax
mov dword [esp + 0x30], eax
cmp dword [ebx + 0x74], 0
mov eax, ebx
cmovne eax, dword [ebx + 0x74]
mov byte [eax + 0x15], 1
mov eax, dword [edx]
mov ecx, dword [esp + 0x1c]
push dword [ecx + eax]
mov eax, dword [esp + 0x1c]
push dword [eax]
push str._s._s
push dword [esp + 0x34]
call fcn.100073c7
push dword [esp + 0x34]
mov ecx, edi
mov esi, eax
push dword [esp + 0x44]
push 0x513
push 0x44
pop edx
call fcn.1001d593
add esp, 0x1c
mov edx, esi
mov ecx, edi
push 0xfffffffffffffff9
call fcn.1001dcab
pop ecx
xor edx, edx
mov ecx, edi
inc edx
call fcn.1001da5a
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x1003fde4
mov edx, eax
call fcn.1001d880
mov esi, dword [esp + 0x24]
jmp 0x1003fc4f
mov edx, dword [esp + 0x18]
jmp 0x1003fc57
mov eax, dword [esp + 0x44]
mov eax, dword [eax]
test eax, eax
jne 0x1003fe06
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
push 2
pop ecx
cmp esi, 5
mov edx, 0x113
push 3
cmove esi, ecx
xor ecx, ecx
push ecx
push eax
push esi
mov ecx, ebx
call fcn.100396de
add esp, 0x10
mov edx, dword [esp + 0x58]
mov ecx, edi
call fcn.1001d880
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
inc edx
mov eax, dword [esp + 0x44]
add eax, 0x18
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
cmp edx, dword [ecx]
jl 0x1003fcce
xor ecx, ecx
mov dword [ebx + 0x34], ecx
jmp 0x1003fe59
xor ecx, ecx
mov edx, dword [ebp + 0x30]
test edx, edx
je 0x1003fe93
cmp dword [edx], ecx
jne 0x1003fe71
push 4
pop eax
mov edx, ecx
mov byte [ebp + 0x20], al
mov dword [ebp + 0x30], edx
jmp 0x1003fe93
mov eax, dword [edx + 0x10]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x1003fe93
push ecx
push ecx
push ecx
push 0xb
pop edx
mov ecx, edi
call fcn.1001d593
mov edx, dword [ebp + 0x30]
add esp, 0xc
mov dword [esp + 0x48], eax
cmp byte [ebp + 0x1c], 0
je 0x1003ffcd
cmp dword [esp + 0x20], 0
jne 0x1003ffcd
dec dword [ebx + 0x38]
mov ecx, dword [ebx + 0x38]
mov eax, dword [esp + 0x18]
mov bl, byte [ebp + 0x20]
mov dword [esp + 0x44], ecx
movzx esi, byte [eax + 0x30]
cmp bl, 0xb
je 0x1003fec7
movzx esi, bl
jmp 0x1003fed0
push 2
cmp esi, 0xb
pop ebx
cmove esi, ebx
mov ebx, dword [esp + 0x34]
test edx, edx
je 0x1003feee
cmp dword [edx + 0x10], 0
jne 0x1003feee
push 6
pop esi
xor eax, eax
cmp dword [edx + 8], eax
push 4
pop eax
cmove esi, eax
jmp 0x1003ff19
cmp esi, 5
jne 0x1003ff19
cmp byte [ebp + 0x20], 5
je 0x1003ff19
xor edx, edx
cmp dword [eax + 8], edx
je 0x1003ff19
push edx
push edx
push edx
push 0xb
pop edx
mov ecx, edi
call fcn.1001d593
mov ecx, dword [esp + 0x50]
add esp, 0xc
inc eax
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x1003ff3e
push eax
push ecx
push dword [ebp + 0x14]
mov ecx, edi
push 0x35
pop edx
call fcn.1001d593
add esp, 0xc
mov edx, 0x90
mov ecx, edi
call fcn.1001da5a
push dword [ebp + 0x14]
mov ecx, edi
push dword [esp + 0x48]
push dword [ebp + 0xc]
push 0x1f
pop edx
call fcn.1001d593
mov eax, esi
add esp, 0xc
sub eax, 1
je 0x1003ff86
sub eax, 1
je 0x1003ff86
sub eax, 1
je 0x1003ff86
sub eax, 1
je 0x10040057
sub eax, 1
je 0x10040066
sub eax, 1
je 0x10040040
push 2
pop eax
mov esi, eax
push dword [esp + 0x18]
mov edx, esi
mov ecx, ebx
call fcn.10039840
pop ecx
mov edx, dword [esp + 0x44]
mov ecx, edi
call fcn.1001d880
mov esi, dword [esp + 0x50]
test esi, esi
je 0x1003ffcd
xor eax, eax
mov ecx, edi
push eax
push eax
push eax
push 0xb
pop edx
call fcn.1001d593
add esp, 0xc
mov dword [esp + 0x60], eax
lea edx, [esi - 1]
mov ecx, edi
call fcn.1001dcf7
mov ecx, dword [edi + 0x6c]
mov dword [eax + 8], ecx
mov esi, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x14], eax
test eax, eax
je 0x10040684
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebp + 8]
cmp dword [edx + ecx*4], 0
je 0x10040670
mov edx, dword [esp + 0x3c]
cmp edx, eax
jne 0x10040115
mov eax, dword [esp + 0x48]
mov ecx, edi
inc eax
mov dword [esp + 0x24], eax
xor eax, eax
push eax
push eax
push eax
push 0xb
pop edx
call fcn.1001d593
mov edx, dword [esp + 0x54]
add esp, 0xc
mov ecx, edi
mov dword [esp + 0x5c], eax
call fcn.1001dcf7
mov ecx, dword [edi + 0x6c]
mov edx, dword [esp + 0x3c]
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x14]
jmp 0x1004011f
push dword [ebp + 0xc]
mov edx, dword [ebp + 0x30]
xor eax, eax
push eax
push dword [esp + 0x20]
mov ecx, ebx
call fcn.1004ea5c
add esp, 0xc
mov edx, dword [ebp + 0x24]
mov ecx, edi
call fcn.1001d5ec
jmp 0x1003ff94
mov eax, dword [esp + 0x28]
xor ecx, ecx
mov esi, dword [esp + 0x18]
mov dword [esp + 0x54], ecx
mov eax, dword [eax + 0x20]
and eax, 0x2000
or eax, ecx
je 0x1004009a
push ecx
push ecx
push 0x7c
mov edx, esi
mov ecx, ebx
call fcn.1004cdb6
add esp, 0xc
mov dword [esp + 0x54], eax
test eax, eax
jne 0x100400d6
xor ecx, ecx
push ecx
push ecx
mov edx, esi
mov ecx, ebx
call fcn.1003e111
pop ecx
pop ecx
test eax, eax
jne 0x100400d6
xor ecx, ecx
cmp dword [esi + 8], ecx
je 0x10040108
cmp dword [ebx + 0x74], ecx
mov eax, ebx
push 0xffffffffffffffff
cmovne eax, dword [ebx + 0x74]
mov edx, esi
push ecx
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp + 0xc]
mov byte [eax + 0x14], 1
call fcn.1003afc4
add esp, 0x10
jmp 0x10040108
cmp dword [ebx + 0x74], 0
mov eax, ebx
push 0xffffffffffffffff
cmovne eax, dword [ebx + 0x74]
mov edx, esi
push 1
push 5
mov ecx, ebx
mov byte [eax + 0x14], 1
xor eax, eax
push eax
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esp + 0x74]
call fcn.1003ad32
add esp, 0x24
mov dword [esp + 0x54], 1
jmp 0x1003ff94
dec dword [ebx + 0x38]
mov ecx, dword [ebx + 0x38]
mov dword [esp + 0x24], ecx
cmp byte [esp + 0x13], 0
jne 0x10040142
test edx, edx
je 0x1004012e
cmp edx, eax
jne 0x10040142
mov eax, dword [ebp + 0x14]
mov edx, esi
inc eax
mov ecx, edi
push eax
call fcn.1003e95a
pop ecx
mov byte [esp + 0x13], 1
mov ecx, dword [ebp + 0x10]
xor edx, edx
mov eax, dword [esp + 0x1c]
add ecx, eax
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x14]
cmp dword [ecx + 0x24], edx
je 0x10040198
mov ecx, dword [ebp + 8]
push edx
push dword [ecx + eax*4]
mov ecx, edi
push edx
push 0x49
pop edx
call fcn.1001d593
mov eax, dword [ebp + 0x14]
add esp, 8
not eax
mov ecx, ebx
mov dword [ebx + 0x34], eax
mov eax, dword [esp + 0x18]
push dword [esp + 0x28]
mov edx, dword [eax + 0x24]
call fcn.10030b18
pop ecx
xor eax, eax
pop ecx
mov ecx, dword [esp + 0x14]
mov dword [ebx + 0x34], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [ebp + 8]
and dword [esp + 0x58], 0
mov eax, dword [edx + eax*4]
inc eax
mov dword [esp + 0x30], eax
xor eax, eax
mov dword [esp + 0x2c], eax
movzx eax, word [ecx + 0x34]
mov edx, eax
cmp word [esp + 0x58], ax
jae 0x10040255
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 0x40], eax
mov eax, dword [ecx + 4]
mov edx, dword [esp + 0x2c]
movsx edx, word [eax + edx*2]
cmp edx, 0xfffffffe
jne 0x10040203
mov eax, dword [ebp + 0x14]
push dword [esp + 0x38]
not eax
mov dword [ebx + 0x34], eax
mov edx, dword [ecx + 0x28]
mov ecx, ebx
mov eax, dword [esp + 0x44]
mov edx, dword [edx + eax + 4]
call fcn.1003021c
xor eax, eax
pop ecx
mov dword [ebx + 0x34], eax
jmp 0x10040236
cmp edx, 0xffffffff
je 0x10040218
movsx eax, word [esi + 0x28]
cmp edx, eax
je 0x10040218
mov eax, dword [ebp + 0x14]
inc eax
add eax, edx
jmp 0x1004021b
mov eax, dword [ebp + 0x14]
xor ecx, ecx
sar edx, 0x1f
push ecx
push dword [esp + 0x3c]
and edx, 1
mov ecx, edi
push eax
add edx, 0x4f
call fcn.1001d593
add esp, 0xc
mov ecx, dword [esp + 0x14]
inc dword [esp + 0x2c]
add dword [esp + 0x40], 0x18
inc dword [esp + 0x38]
movzx edx, word [ecx + 0x34]
cmp dword [esp + 0x2c], edx
jl 0x100401cd
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 8]
push dword [ecx + eax*4]
movzx eax, dx
mov ecx, edi
push eax
push dword [esp + 0x38]
push 0x5c
pop edx
call fcn.1001d593
mov ecx, dword [esp + 0x20]
add esp, 0xc
cmp dword [ebp + 0x18], 0
je 0x1004029a
cmp dword [esp + 0x20], ecx
jne 0x1004029a
cmp byte [ebp + 0x1c], 0
jne 0x1004029a
mov edx, dword [esp + 0x24]
mov ecx, edi
call fcn.1001d880
jmp 0x10040665
movzx eax, byte [ecx + 0x36]
test eax, eax
je 0x1004028a
mov dl, byte [ebp + 0x20]
cmp dl, 0xb
je 0x100402af
movzx eax, dl
jmp 0x100402b8
push 2
cmp eax, 0xb
pop edx
cmove eax, edx
mov dword [esp + 0x38], eax
cmp dword [esp + 0x3c], ecx
jne 0x100402d6
mov edx, dword [ebp + 0x30]
push 6
pop eax
push 4
cmp dword [edx + 8], 0
pop edx
cmove eax, edx
mov dword [esp + 0x38], eax
cmp dword [esp + 0x1c], 0
jne 0x10040341
xor edx, edx
cmp dword [ecx + 0x14], edx
jne 0x10040341
cmp dword [esp + 0x20], ecx
jne 0x10040341
cmp eax, 5
jne 0x10040341
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x20]
and eax, 0x2000
mov dword [esp + 0x68], eax
je 0x10040317
push edx
push edx
push 0x7c
mov edx, esi
mov ecx, ebx
call fcn.1004cdb6
add esp, 0xc
test eax, eax
jne 0x10040341
xor edx, edx
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x20]
and eax, 0x4000
mov dword [esp + 0x68], eax
je 0x1004028a
cmp dword [esi + 0x10], edx
jne 0x10040341
mov ecx, esi
call fcn.1003d9e9
test eax, eax
je 0x1004028a
mov eax, dword [esp + 0x14]
mov ecx, edi
movzx eax, word [eax + 0x32]
push eax
push dword [esp + 0x34]
push dword [esp + 0x2c]
push dword [esp + 0x50]
push 0x1b
pop edx
call fcn.1001d7e6
mov eax, dword [esp + 0x24]
add esp, 0x10
mov edx, dword [esp + 0x20]
cmp eax, edx
jne 0x10040375
mov ecx, dword [esp + 0x30]
jmp 0x1004038a
mov edx, dword [esp + 0x4c]
mov ecx, ebx
call fcn.10031611
mov edx, dword [esp + 0x20]
mov ecx, eax
mov eax, dword [esp + 0x14]
cmp dword [ebp + 0x18], 0
mov dword [esp + 0x2c], ecx
jne 0x1004039f
cmp dword [esp + 0x38], 5
jne 0x1004051f
test byte [esi + 0x24], 0x20
jne 0x100403ee
xor eax, eax
mov edx, 0x87
push eax
push ecx
push dword [esp + 0x4c]
mov ecx, edi
call fcn.1001d593
mov eax, dword [ebp + 0x18]
add esp, 0xc
test eax, eax
je 0x1004051f
push eax
push dword [esp + 0x28]
mov ecx, edi
push dword [esp + 0x34]
push 0x35
pop edx
call fcn.1001d593
add esp, 0xc
mov edx, 0x90
mov ecx, edi
call fcn.1001da5a
jmp 0x1004051f
cmp eax, edx
je 0x1004044c
xor ebx, ebx
cmp bx, word [edx + 0x32]
mov dword [esp + 0x58], ebx
mov ebx, dword [esp + 0x34]
jae 0x1004044c
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x58]
mov edx, dword [edx + 4]
lea eax, [ecx + ebx]
push eax
mov ecx, esi
mov dx, word [edx + ebx*2]
call fcn.100359fc
cwde
mov ecx, edi
push eax
push dword [esp + 0x4c]
push 0x5a
pop edx
call fcn.1001d593
mov edx, dword [esp + 0x2c]
add esp, 0xc
mov ecx, dword [esp + 0x2c]
inc ebx
movzx eax, word [edx + 0x32]
cmp ebx, eax
jl 0x1004040a
mov ebx, dword [esp + 0x34]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
cmp dword [ebp + 0x18], 0
je 0x1004051f
movzx ecx, word [edx + 0x32]
mov eax, dword [eax + 0x38]
mov edx, dword [edi + 0x6c]
and al, 3
add edx, ecx
mov dword [esp + 0x58], 0x34
mov dword [esp + 0x64], edx
cmp al, 2
mov edx, dword [esp + 0x2c]
cmove edx, dword [esp + 0x30]
mov dword [esp + 0x68], edx
xor edx, edx
mov eax, edx
mov dword [esp + 0x40], eax
test ecx, ecx
je 0x10040521
mov esi, dword [esp + 0x64]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x20]
mov ecx, ebx
mov edx, dword [edx + eax*4]
call fcn.100364d7
mov edx, eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0x40]
movsx ecx, word [ecx + eax*2]
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0x20]
movzx ecx, word [ecx + 0x32]
dec ecx
cmp eax, ecx
jne 0x100404d2
mov esi, dword [esp + 0x24]
mov dword [esp + 0x58], 0x35
add eax, dword [esp + 0x68]
mov ecx, dword [ebp + 0x18]
push 0xfffffffffffffffe
push edx
mov edx, dword [esp + 0x60]
inc ecx
push eax
mov eax, dword [esp + 0x70]
add eax, ecx
mov ecx, edi
push esi
push eax
call fcn.1001d6b7
add esp, 0x14
mov edx, 0x90
mov ecx, edi
call fcn.1001da5a
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x40]
inc ecx
mov dword [esp + 0x40], ecx
movzx eax, word [eax + 0x32]
cmp ecx, eax
mov eax, ecx
jl 0x10040493
mov esi, dword [esp + 0x18]
xor edx, edx
mov eax, dword [esp + 0x38]
sub eax, 1
je 0x10040607
sub eax, 1
je 0x10040607
sub eax, 1
je 0x10040607
sub eax, 1
je 0x100405fb
push 2
pop ecx
sub eax, ecx
je 0x100405e1
mov eax, dword [esp + 0x28]
mov dword [esp + 0x58], edx
mov eax, dword [eax + 0x20]
and eax, 0x2000
or eax, edx
je 0x10040582
push edx
push edx
push 0x7c
mov edx, esi
mov ecx, ebx
call fcn.1004cdb6
add esp, 0xc
mov dword [esp + 0x58], eax
test eax, eax
jne 0x10040593
xor edx, edx
push edx
push edx
mov edx, esi
mov ecx, ebx
call fcn.1003e111
pop ecx
pop ecx
test eax, eax
je 0x100405a1
cmp dword [ebx + 0x74], 0
mov eax, ebx
cmovne eax, dword [ebx + 0x74]
mov byte [eax + 0x14], 1
push dword [esp + 0x44]
mov eax, dword [esp + 0x24]
mov edx, esi
cmp dword [esp + 0x18], eax
mov ecx, ebx
sete al
movzx eax, al
push eax
push 5
xor eax, eax
push eax
push dword [esp + 0x5c]
push dword [esp + 0x40]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esp + 0x78]
call fcn.1003ad32
add esp, 0x24
mov dword [esp + 0x54], 1
jmp 0x10040617
mov eax, dword [esp + 0x1c]
mov ecx, ebx
add eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x30]
push eax
push dword [esp + 0x18]
push esi
call fcn.1004ea5c
add esp, 0xc
mov edx, dword [ebp + 0x24]
mov ecx, edi
call fcn.1001d5ec
jmp 0x10040617
push dword [esp + 0x14]
mov edx, dword [esp + 0x3c]
mov ecx, ebx
call fcn.1003972e
pop ecx
mov eax, dword [esp + 0x3c]
mov ecx, edi
cmp eax, dword [esp + 0x14]
jne 0x10040642
mov edx, dword [esp + 0x48]
lea edx, [edx + 1]
call fcn.1001d5ec
mov edx, dword [esp + 0x5c]
mov ecx, edi
call fcn.1001dcf7
mov ecx, dword [edi + 0x6c]
mov dword [eax + 8], ecx
jmp 0x1004064b
mov edx, dword [esp + 0x24]
call fcn.1001d880
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x30]
je 0x10040665
push dword [esp + 0x4c]
mov edx, eax
mov ecx, ebx
call fcn.10031647
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebp + 8]
mov eax, dword [eax + 0x14]
inc ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
test eax, eax
jne 0x1003ffed
mov eax, dword [esp + 0x50]
test eax, eax
je 0x100406a6
mov edx, eax
mov ecx, edi
call fcn.1001d5ec
mov edx, dword [esp + 0x60]
mov ecx, edi
call fcn.1001dcf7
mov ecx, dword [edi + 0x6c]
mov dword [eax + 8], ecx
test byte [esi + 0x24], 0x20
jne 0x100406e1
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 8]
push dword [ecx + eax*4]
movsx eax, word [esi + 0x2a]
mov ecx, edi
push eax
mov eax, dword [ebp + 0x14]
inc eax
push eax
push 0x5c
pop edx
call fcn.1001d593
add esp, 0xc
cmp byte [esp + 0x13], 0
jne 0x100406e1
xor eax, eax
mov edx, esi
push eax
mov ecx, edi
call fcn.1003e95a
pop ecx
mov eax, dword [ebp + 0x28]
mov ecx, dword [esp + 0x54]
pop edi
pop esi
mov dword [eax], ecx
pop ebx
mov esp, ebp
pop ebp
ret