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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc8
mov esi, dword [ebp + 0x24]
mov edx, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], esi
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 4], eax
mov dword [esp + 0x38], eax
mov dword [esp + 8], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov eax, dword [ebp + 0x20]
mov edi, 6
test eax, eax
js 0x404c63
mov edi, eax
mov eax, esi
or eax, edx
je 0x404c6f
mov ax, 8
jmp 0x404c8a
cmp dword [ebp + 0x14], 0
je 0x404c88
mov eax, edi
xor eax, 0xfffffbff
mov ecx, edi
or ecx, 0x400
test ecx, eax
je 0x404c69
xor eax, eax
test edi, 0x10000
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], esi
jne 0x404ca2
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x8c], eax
mov eax, edi
xor eax, 0xfffffff0
mov esi, edi
or esi, 0xf
and esi, eax
sete dh
mov eax, edi
xor eax, 0xfffffbff
or edi, 0x400
and edi, eax
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0xc], ecx
test ecx, ecx
je 0x4050cc
cmp dword [ebx + 0x14], 2
jne 0x4050cc
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x4050cc
or dl, cl
je 0x4050cc
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x4050cc
cmp esi, 0xb
jae 0x4050cc
mov byte [esp + 0x14], dh
mov ecx, dword [esp + 0xc]
cmp dword [ecx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x404d4e
xor ebx, ebx
cmp ecx, 0xffffffff
mov edx, dword [esp + 0x18]
jne 0x404d6d
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x4050d5
mov edx, dword [esp + 0x18]
test edx, edx
jne 0x404d60
mov bl, 1
cmp ecx, 0xffff
jne 0x404d6d
mov ecx, dword [esp + 0xc]
mov dword [ecx + 0x34], 1
xor ebx, ebx
mov ecx, dword [esp + 0x20]
or ecx, edx
je 0x404d88
test edi, edi
jne 0x404d88
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x4050d3
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x404e0a
test edi, edi
je 0x404da5
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x90], eax
mov byte [esp + 0x24], 1
jmp 0x404df8
or byte [esp + 0x14], al
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.00402bd0
add esp, 0xc
mov dword [esp + 0x90], eax
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0
mov eax, 0
cmp ecx, 4
setb cl
jb 0x404ddf
mov eax, esi
mov dword [esp + 0x18], 0
or cl, byte [esp + 0x14]
mov byte [esp + 0x24], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x20], ecx
mov esi, eax
push dword [ebp + 0xc]
call fcn.004080d0
add esp, 4
cmp eax, 0x10000
jb 0x404e19
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x4050d3
mov dword [esp + 0x14], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x88], eax
mov dword [esp + 0x2c], 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x24]
or edx, eax
mov edx, 0
je 0x404e54
mov edx, 0xfffffffe
add edx, eax
inc edx
mov ecx, dword [ecx]
and ecx, edx
sub eax, ecx
and eax, edx
mov edx, eax
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 4]
xor edx, edx
mov dword [esp + 0x10], eax
add eax, dword [esp + 0x88]
setb dl
add eax, dword [esp + 0x14]
adc edx, 0
add eax, 0x4a
adc edx, 0
mov ecx, 0xfffffffe
cmp ecx, eax
sbb dword [esp + 0x2c], edx
jae 0x404e98
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x4050d3
mov ecx, 0x1c
test bl, bl
je 0x404f09
mov eax, dword [esp + 0x14]
shr eax, 0x1f
mov dword [esp + 0x2c], eax
xor ecx, ecx
mov ebx, dword [esp + 0x88]
add ebx, dword [ebp + 0x38]
mov edx, 0
adc edx, 0xffffffff
add ebx, dword [ebp + 0x40]
adc edx, 0
mov eax, dword [esp + 0x14]
add eax, eax
add ebx, eax
adc edx, dword [esp + 0x2c]
add ebx, dword [esp + 0x28]
adc edx, 0
add ebx, dword [esp + 0x10]
adc edx, 0
mov eax, dword [ebp + 8]
add ebx, dword [eax]
adc edx, dword [eax + 4]
add ebx, 0x72
adc edx, 0
cmp edx, 0xffffffff
mov edx, dword [esp + 0x14]
je 0x404f0d
mov eax, dword [esp + 0xc]
mov dword [eax + 0x34], 1
mov ecx, 0x1c
jmp 0x404f0d
mov edx, dword [esp + 0x14]
mov dword [esp + 0x2c], 0
test edx, edx
je 0x404f46
mov eax, dword [ebp + 0xc]
cmp byte [eax + edx - 1], 0x2f
mov ebx, dword [ebp + 8]
jne 0x404f46
cmp dword [ebp + 0x14], 0
jne 0x4050cc
mov dword [esp + 0x2c], 0x10
mov eax, dword [esp + 0x20]
or eax, dword [esp + 0x18]
jne 0x4050cc
mov eax, dword [esp + 0x88]
add eax, edx
add eax, 0x2e
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, dword [esp + 0x10]
lea eax, [ecx + edx*2]
mov ebx, dword [esp + 0xc]
cmp dword [ebx + 8], eax
jae 0x404f7f
push 1
push eax
push ebx
push dword [ebp + 8]
call fcn.00407e40
add esp, 0x10
test eax, eax
je 0x4050df
mov eax, dword [ebx + 0x14]
inc eax
cmp dword [ebx + 0x18], eax
jae 0x404fa2
lea ecx, [ebx + 0x10]
push 1
push eax
push ecx
push dword [ebp + 8]
call fcn.00407e40
add esp, 0x10
test eax, eax
je 0x4050df
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x24]
mov ebx, dword [ebp + 8]
jne 0x404fcc
push 0x4df40
push 1
push dword [ebx + 0x34]
call dword [ebx + 0x28]
add esp, 0xc
test eax, eax
je 0x405111
mov dword [esp + 0x10], eax
mov ecx, ebx
mov edx, dword [esp + 4]
push dword [esp + 0x28]
mov ebx, dword [esp + 0xc]
push ebx
call fcn.00405800
add esp, 8
test eax, eax
je 0x4050eb
test edi, edi
setne al
mov ecx, dword [esp + 4]
add ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
adc ebx, 0
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov word [esp + 0x84], 0
movzx ecx, byte [esp + 0x24]
xor cl, 1
or cl, al
mov byte [esp + 0x4c], cl
movzx eax, cl
shl eax, 3
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x34], 0
mov edi, ebx
je 0x4050fd
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x20]
mov eax, 0
sbb eax, dword [esp + 0x18]
mov ebx, dword [esp + 4]
jb 0x4050af
xor eax, eax
mov ecx, 0xfffffffe
cmp ecx, ebx
sbb eax, edi
mov eax, ebx
mov ecx, edi
mov dword [esp + 0xc], 0
jae 0x405259
xor eax, eax
mov ecx, 0xfffffffe
cmp ecx, ebx
mov ecx, 0
sbb ecx, edi
jb 0x40520f
xor ecx, ecx
jmp 0x405213
mov dword [ebx + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x10
jmp 0x4050d3
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x4050d3
test edi, edi
mov edx, dword [esp + 0x14]
je 0x40511a
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x4050d3
mov dword [ebx + 0x1c], 0x10
jmp 0x4050d3
mov dword [esp + 0x68], 0x4034b50
movzx eax, byte [esp + 0x4c]
test al, al
je 0x40512d
mov al, 0x14
mov byte [esp + 0x6c], al
mov ecx, dword [esp + 0x8c]
movzx eax, cx
mov byte [esp + 0x6e], cl
mov byte [esp + 0x6f], ah
mov eax, dword [esp + 0x28]
mov byte [esp + 0x70], al
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov byte [esp + 0x81], 0
mov byte [esp + 0x82], dl
mov byte [esp + 0x83], dh
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x84], al
mov byte [esp + 0x85], ah
lea eax, [esp + 0x68]
push 0x1e
push eax
push edi
mov ebx, dword [esp + 0x10]
push ebx
mov dword [esp + 0x18], edi
mov edi, dword [ebp + 8]
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40536b
add ebx, 0x1e
mov eax, dword [esp + 8]
adc eax, 0
mov ecx, edi
mov edi, dword [esp + 0x14]
push edi
push dword [ebp + 0xc]
mov dword [esp + 0x10], eax
push eax
push ebx
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x4053f8
mov eax, ebx
and eax, edi
mov ecx, eax
shr ecx, 0x1f
add eax, eax
xor ebx, edi
add ebx, eax
mov dword [esp + 4], ebx
adc dword [esp + 8], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 0x18], 0
jmp 0x405383
lea ecx, [esp + 0x38]
mov edx, 0xfffffffe
cmp edx, dword [esp + 0x20]
mov edx, 0
sbb edx, dword [esp + 0x18]
jb 0x40522e
mov edx, 0
jmp 0x405232
lea edx, [esp + 0x30]
jae 0x405238
lea eax, [esp + 0x40]
lea ebx, [esp + 0xa8]
push ecx
push edx
push eax
mov dword [esp + 0x18], ebx
push ebx
call fcn.004058b0
add esp, 0x10
mov edx, eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 8], edi
mov dword [esp + 0x18], edx
mov edi, dword [ebp + 0x38]
add edx, edi
mov dword [esp + 0x68], 0x4034b50
movzx ebx, byte [esp + 0x4c]
test bl, bl
je 0x405279
mov bl, 0x14
mov byte [esp + 0x6c], bl
mov byte [esp + 0x6d], 0
movzx ebx, word [esp + 0x8c]
mov byte [esp + 0x6e], bl
mov byte [esp + 0x6f], bh
mov ebx, dword [esp + 0x28]
mov byte [esp + 0x70], bl
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov byte [esp + 0x81], 0
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x82], bl
mov byte [esp + 0x83], bh
mov byte [esp + 0x84], dl
mov byte [esp + 0x85], dh
lea edx, [esp + 0x68]
push 0x1e
push edx
push ecx
push eax
mov edi, dword [ebp + 8]
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40536b
mov eax, dword [esp + 4]
add eax, 0x1e
mov ecx, edi
mov edi, dword [esp + 8]
adc edi, 0
push ebx
push dword [ebp + 0xc]
push edi
mov dword [esp + 0x10], eax
push eax
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x4053f8
mov ecx, dword [esp + 4]
add ecx, ebx
adc edi, 0
cmp dword [esp + 0xc], 0
mov dword [esp + 4], ecx
je 0x405377
lea eax, [esp + 0xa8]
mov ebx, dword [esp + 0x18]
push ebx
push eax
push edi
push ecx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x4055cb
add dword [esp + 4], ebx
adc edi, 0
mov dword [esp + 8], edi
jmp 0x405383
mov dword [edi + 0x1c], 0x13
jmp 0x4050d3
mov dword [esp + 8], edi
mov dword [esp + 0xc], 0
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x4053b5
push eax
push dword [ebp + 0x34]
push dword [esp + 0x10]
push dword [esp + 0x10]
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
mov edi, eax
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x4055da
add dword [esp + 4], edi
adc dword [esp + 8], 0
cmp byte [esp + 0x24], 0
je 0x405414
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4053f8
mov eax, dword [ebp + 0x14]
add dword [esp + 4], eax
adc dword [esp + 8], 0
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], 0
jmp 0x4054c5
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x4050d3
cmp dword [ebp + 0x14], 0
je 0x4054c5
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
xor eax, eax
cmp esi, 4
setb al
shl eax, 0xe
or eax, dword [esi*4 + 0x43e84c]
test esi, esi
jne 0x405460
or eax, 0x80000
lea ecx, [esp + 0x50]
push eax
push ecx
push 0x405920
mov esi, dword [esp + 0x1c]
push esi
call fcn.004040b0
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xa4], eax
lea eax, [esp + 0xa4]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.00402c90
add esp, 0x18
cmp eax, 1
jne 0x4055ef
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 8], eax
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov edi, eax
mov dword [esp + 0x20], ecx
or eax, ecx
je 0x4055e6
mov dword [esp + 0x50], 0x8074b50
mov ecx, dword [esp + 0x90]
mov byte [esp + 0x54], cl
mov byte [esp + 0x55], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x56], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x57], al
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0xc], 0
je 0x40560b
mov byte [esp + 0x58], bl
mov byte [esp + 0x59], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, ecx
shr eax, 0x10
shr ebx, 0x18
mov byte [esp + 0x5b], bl
mov ebx, ecx
shr ebx, 0x18
mov byte [esp + 0x5c], cl
mov byte [esp + 0x5d], ch
mov byte [esp + 0x5e], al
mov byte [esp + 0x5f], bl
mov ecx, edi
mov byte [esp + 0x60], cl
mov byte [esp + 0x61], ch
mov eax, edi
shr eax, 0x10
mov byte [esp + 0x62], al
mov eax, edi
shr eax, 0x18
mov byte [esp + 0x63], al
lea eax, [esp + 0x64]
mov dword [esp + 0x98], eax
mov dword [esp + 0x10], 0x38
mov dword [esp + 0x9c], 0x30
mov ecx, 0x28
mov dword [esp + 0x24], 0x18
mov eax, dword [esp + 0x20]
mov byte [esp + 0x1f], al
mov dword [esp + 0x4c], 0x17
mov dword [esp + 0xa0], 0x16
mov dword [esp + 0x94], 0x15
jmp 0x405666
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x4050d3
mov dword [ebx + 0x1c], 0x13
jmp 0x4050d3
xor eax, eax
xor ecx, ecx
jmp 0x40570e
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x4050d3
test ecx, ecx
jne 0x405105
mov dword [esp + 0x58], ebx
lea eax, [esp + 0x5c]
mov dword [esp + 0x98], eax
mov dword [esp + 0x10], 0x18
mov dword [esp + 0x9c], 0x10
mov ecx, 8
mov dword [esp + 0x4c], 0xf
mov eax, edi
mov byte [esp + 0x1f], al
mov dword [esp + 0xa0], 0xe
mov dword [esp + 0x94], 0xd
mov dword [esp + 0x24], 0x10
mov ebx, edi
mov eax, dword [esp + 0x20]
shrd ebx, eax, cl
shr eax, cl
mov esi, dword [esp + 0x98]
movzx edx, byte [esp + 0x1f]
mov byte [esi], dl
test cl, 0x20
jne 0x405686
mov eax, ebx
mov ebx, edi
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x20]
shrd ebx, edx, cl
mov esi, dword [esp + 0x94]
mov byte [esp + esi + 0x50], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x4056ac
mov eax, ebx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
shrd edi, edx, cl
mov ebx, dword [esp + 0xa0]
mov byte [esp + ebx + 0x50], al
shr edx, cl
test cl, 0x20
jne 0x4056cb
mov edx, edi
mov eax, dword [esp + 0x4c]
mov byte [esp + eax + 0x50], dl
lea eax, [esp + 0x50]
mov esi, dword [esp + 0x24]
push esi
push eax
push dword [esp + 0x10]
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4050d3
mov eax, dword [esp + 0x24]
add dword [esp + 4], eax
adc dword [esp + 8], 0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0xc], 0
je 0x405773
xor edx, edx
mov esi, 0xfffffffe
cmp esi, dword [esp + 0x38]
mov esi, 0
sbb esi, dword [esp + 0x3c]
jb 0x40572f
xor edi, edi
jmp 0x405733
lea edi, [esp + 0x38]
mov esi, 0xfffffffe
cmp esi, eax
mov eax, 0
sbb eax, ecx
jb 0x40574a
mov eax, 0
jmp 0x40574e
lea eax, [esp + 0x30]
jae 0x405754
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa8]
push edi
push eax
push edx
push ecx
call fcn.004058b0
add esp, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
movzx ebx, word [esp + 0x8c]
movzx esi, word [esp + 0x28]
movzx edx, word [esp + 0x18]
movzx edi, word [esp + 0x14]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x34]
push dword [esp + 0x48]
push dword [esp + 0x48]
push 0
push 0
push ebx
push esi
push dword [esp + 0xb4]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push ecx
push eax
push dword [esp + 0xc0]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x50]
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00405970
add esp, 0x54
test eax, eax
je 0x4050d3
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 4]
mov dword [eax], ecx
mov ecx, dword [esp + 8]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x4050d5