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

Disassembly:
push ebx
push esi
push edi
push ebp
sub esp, 0x98
mov edi, ecx
mov edx, dword [edi + 0x5c]
test edx, edx
je 0x4053a0
mov ebx, dword [edi + 0x6c]
mov eax, dword [edi + 0x9c]
cmp ebx, eax
jne 0x4053a0
add esp, 0x98
pop ebp
pop edi
pop esi
pop ebx
ret
mov eax, dword [edi + 0x1c]
cmp eax, 1
je 0x4053d0
cmp eax, 4
je 0x4053d0
cmp eax, 8
je 0x4053d0
cmp eax, 0x10
je 0x4053d0
cmp eax, 0x18
je 0x4053d0
cmp eax, 0x20
je 0x4053d0
add esp, 0x98
pop ebp
pop edi
pop esi
pop ebx
ret
test edx, edx
jne 0x405470
push 0x30
call fcn.00493ea0
pop ecx
mov ebx, eax
push 0x28
push 0
push ebx
call fcn.0040cf20
add esp, 0xc
mov dword [ebx], 0x28
mov esi, dword [edi + 0x80]
mov dword [ebx + 4], esi
mov eax, dword [edi + 0x84]
neg eax
mov dword [ebx + 8], eax
mov word [ebx + 0xc], 1
mov word [ebx + 0xe], 1
mov dword [ebx + 0x10], 0
mov byte [ebx + 0x2a], 0
mov byte [ebx + 0x29], 0
mov byte [ebx + 0x28], 0
mov byte [ebx + 0x2b], 0
mov byte [ebx + 0x2e], 0xff
mov byte [ebx + 0x2d], 0xff
mov byte [ebx + 0x2c], 0xff
mov byte [ebx + 0x2f], 0xff
push 0
push 0
lea eax, [edi + 0x74]
push eax
push 0
push ebx
push 0
call dword [0x4ea5f8]
mov dword [edi + 0x5c], eax
push ebx
call fcn.00493ed0
pop ecx
cmp dword [edi + 0x5c], 0
jne 0x405470
add esp, 0x98
pop ebp
pop edi
pop esi
pop ebx
ret
cmp dword [edi + 0x60], 0
jne 0x40549f
lea eax, [esp + 0x94]
push eax
lea ebp, [edi + 0x70]
push ebp
mov eax, dword [edi + 0x1c]
push eax
mov ecx, dword [edi + 0x84]
push ecx
mov eax, dword [edi + 0x80]
push eax
call fcn.00404510
add esp, 0x14
mov dword [edi + 0x60], eax
mov edx, dword [edi + 0x7c]
imul edx, dword [edi + 0x84]
push edx
mov ebx, dword [edi + 0x78]
push ebx
mov eax, dword [edi + 0x70]
push eax
call fcn.0040cef0
add esp, 0xc
mov eax, dword [edi + 0x7c]
mov dword [esp + 0x8c], eax
mov eax, dword [edi + 0x80]
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
lea eax, [eax*4]
mov dword [esp + 0x90], eax
mov esi, dword [edi + 0x9c]
mov dword [edi + 0x6c], esi
mov ebp, dword [edi + 0x1c]
mov eax, dword [edi + 0x1c]
dec eax
cmp eax, 0x1f
ja case.0x4054fd.2
jmp dword [eax*4 + 0x4be64c]
mov dword [esp + 0x60], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x54], 0
jmp 0x40558e
mov ebx, dword [edi + 0x78]
add ebx, dword [esp + 0x44]
mov ebp, dword [edi + 0x70]
add ebp, dword [esp + 0x44]
mov esi, dword [edi + 0x74]
add esi, dword [esp + 0x54]
mov dword [esp + 0x34], 0
jmp 0x405563
mov eax, dword [esp + 0x34]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov cl, byte [ebx + eax]
not cl
mov byte [esi + eax], cl
movzx edx, byte [ebx + eax]
not edx
or byte [ebp + eax], dl
inc dword [esp + 0x34]
mov eax, dword [esp + 0x34]
cmp eax, dword [edi + 0x3c]
jl 0x405540
mov eax, dword [esp + 0x44]
add eax, dword [esp + 0x8c]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x54]
add eax, dword [esp + 0x90]
mov dword [esp + 0x54], eax
inc dword [esp + 0x60]
mov eax, dword [esp + 0x60]
cmp eax, dword [edi + 0x40]
jl 0x405520
jmp case.0x4054fd.2
mov dword [esp + 0x88], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
jmp 0x40571b
mov eax, dword [edi + 0x78]
mov dword [esp + 0x38], eax
add eax, dword [esp + 0x80]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x70]
mov dword [esp + 0x3c], eax
add eax, dword [esp + 0x80]
mov dword [esp + 0x3c], eax
mov esi, dword [edi + 0x74]
add esi, dword [esp + 0x84]
xor ebp, ebp
mov dword [esp + 0xc], 0
jmp 0x4056dd
mov eax, dword [esp + 0x38]
movzx eax, byte [eax + ebp]
and eax, 0xf0
jne 0x405640
mov eax, 7
and eax, dword [esp + 0xc]
mov ecx, 7
sub ecx, eax
mov ebx, 1
shl ebx, cl
mov eax, dword [esp + 0xc]
cdq
and edx, 7
add eax, edx
sar eax, 3
or byte [esi + eax], bl
mov eax, dword [esp + 0x3c]
or byte [eax + ebp], 0xf0
jmp 0x405667
mov eax, 7
and eax, dword [esp + 0xc]
mov ecx, 7
sub ecx, eax
mov ebx, 0xfffffffe
rol ebx, cl
mov eax, dword [esp + 0xc]
cdq
and edx, 7
add eax, edx
sar eax, 3
and byte [esi + eax], bl
mov edx, dword [esp + 0xc]
inc edx
cmp edx, dword [edi + 0x3c]
jge 0x4056ea
mov eax, dword [esp + 0x38]
movzx eax, byte [eax + ebp]
and eax, 0xf
jne 0x4056b0
mov eax, dword [esp + 0xc]
inc eax
and eax, 7
mov ecx, 7
sub ecx, eax
mov ebx, 1
shl ebx, cl
mov eax, dword [esp + 0xc]
inc eax
cdq
and edx, 7
add eax, edx
sar eax, 3
or byte [esi + eax], bl
mov eax, dword [esp + 0x3c]
or byte [eax + ebp], 0xf
jmp 0x4056d7
mov eax, dword [esp + 0xc]
inc eax
and eax, 7
mov ecx, 7
sub ecx, eax
mov ebx, 0xfffffffe
rol ebx, cl
mov eax, dword [esp + 0xc]
inc eax
cdq
and edx, 7
add eax, edx
sar eax, 3
and byte [esi + eax], bl
inc ebp
add dword [esp + 0xc], 2
mov eax, dword [esp + 0xc]
cmp eax, dword [edi + 0x3c]
jl 0x405600
mov eax, dword [esp + 0x80]
add eax, dword [esp + 0x8c]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x84]
add eax, dword [esp + 0x90]
mov dword [esp + 0x84], eax
inc dword [esp + 0x88]
mov eax, dword [esp + 0x88]
cmp eax, dword [edi + 0x40]
jl 0x4055c2
jmp case.0x4054fd.2
mov dword [esp + 0x70], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x5c], 0
jmp 0x405802
mov eax, dword [edi + 0x78]
mov dword [esp + 0x20], eax
add eax, dword [esp + 0x48]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x70]
mov dword [esp + 0x30], eax
add eax, dword [esp + 0x48]
mov dword [esp + 0x30], eax
mov esi, dword [edi + 0x74]
add esi, dword [esp + 0x5c]
xor ebp, ebp
jmp 0x4057db
mov eax, dword [esp + 0x20]
cmp byte [eax + ebp], 0xd7
jne 0x4057b7
mov eax, 7
and eax, ebp
mov ecx, 7
sub ecx, eax
mov ebx, 1
shl ebx, cl
mov eax, ebp
cdq
and edx, 7
add eax, edx
sar eax, 3
or byte [esi + eax], bl
mov eax, dword [esp + 0x30]
mov byte [eax + ebp], 0
jmp 0x4057da
mov eax, 7
and eax, ebp
mov ecx, 7
sub ecx, eax
mov ebx, 0xfffffffe
rol ebx, cl
mov eax, ebp
cdq
and edx, 7
add eax, edx
sar eax, 3
and byte [esi + eax], bl
inc ebp
cmp ebp, dword [edi + 0x3c]
jl 0x405780
mov eax, dword [esp + 0x48]
add eax, dword [esp + 0x8c]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x5c]
add eax, dword [esp + 0x90]
mov dword [esp + 0x5c], eax
inc dword [esp + 0x70]
mov eax, dword [esp + 0x70]
cmp eax, dword [edi + 0x40]
jl 0x405750
jmp case.0x4054fd.2
mov dword [esp + 0x7c], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x64], 0
jmp 0x4058ee
mov eax, dword [edi + 0x78]
mov dword [esp + 0x1c], eax
add eax, dword [esp + 0x4c]
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x70]
mov dword [esp + 0x2c], eax
add eax, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov esi, dword [edi + 0x74]
add esi, dword [esp + 0x64]
xor ebp, ebp
jmp 0x4058c7
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + ebp*2]
and eax, 0x7fff
cmp eax, 0x7fff
jne 0x4058a3
mov eax, dword [esp + 0x2c]
mov word [eax + ebp*2], 0
mov eax, 7
and eax, ebp
mov ecx, 7
sub ecx, eax
mov ebx, 1
shl ebx, cl
mov eax, ebp
cdq
and edx, 7
add eax, edx
sar eax, 3
or byte [esi + eax], bl
jmp 0x4058c6
mov eax, 7
and eax, ebp
mov ecx, 7
sub ecx, eax
mov ebx, 0xfffffffe
rol ebx, cl
mov eax, ebp
cdq
and edx, 7
add eax, edx
sar eax, 3
and byte [esi + eax], bl
inc ebp
cmp ebp, dword [edi + 0x3c]
jl 0x405860
mov eax, dword [esp + 0x4c]
add eax, dword [esp + 0x8c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x64]
add eax, dword [esp + 0x90]
mov dword [esp + 0x64], eax
inc dword [esp + 0x7c]
mov eax, dword [esp + 0x7c]
cmp eax, dword [edi + 0x40]
jl 0x405831
jmp case.0x4054fd.2
mov dword [esp + 0x78], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x68], 0
jmp 0x405a08
mov eax, dword [edi + 0x78]
mov dword [esp + 4], eax
add eax, dword [esp + 0x58]
mov dword [esp + 4], eax
mov esi, dword [edi + 0x70]
add esi, dword [esp + 0x58]
mov eax, dword [edi + 0x74]
mov dword [esp + 0x10], eax
add eax, dword [esp + 0x68]
mov dword [esp + 0x10], eax
xor ebp, ebp
mov dword [esp + 0x24], 0
jmp 0x4059d9
mov eax, dword [esp + 4]
cmp byte [eax + ebp], 0xff
jne 0x4059a7
cmp byte [eax + ebp + 1], 0xff
jne 0x4059a7
cmp byte [eax + ebp + 2], 0xff
jne 0x4059a7
mov eax, 7
and eax, dword [esp + 0x24]
mov ecx, 7
sub ecx, eax
mov ebx, 1
shl ebx, cl
mov eax, dword [esp + 0x24]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [esp + 0x10]
or byte [ecx + eax], bl
mov byte [esi + ebp], 0
mov byte [esi + ebp + 1], 0
mov byte [esi + ebp + 2], 0
jmp 0x4059d2
mov eax, 7
and eax, dword [esp + 0x24]
mov ecx, 7
sub ecx, eax
mov ebx, 0xfffffffe
rol ebx, cl
mov eax, dword [esp + 0x24]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [esp + 0x10]
and byte [ecx + eax], bl
add ebp, 3
inc dword [esp + 0x24]
mov eax, dword [esp + 0x24]
cmp eax, dword [edi + 0x3c]
jl 0x405954
mov eax, dword [esp + 0x58]
add eax, dword [esp + 0x8c]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x68]
add eax, dword [esp + 0x90]
mov dword [esp + 0x68], eax
inc dword [esp + 0x78]
mov eax, dword [esp + 0x78]
cmp eax, dword [edi + 0x40]
jl 0x405920
jmp case.0x4054fd.2
mov dword [esp + 0x74], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x6c], 0
jmp 0x405aef
mov eax, dword [edi + 0x78]
mov dword [esp + 0x18], eax
add eax, dword [esp + 0x50]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x70]
mov dword [esp + 0x28], eax
add eax, dword [esp + 0x50]
mov dword [esp + 0x28], eax
mov esi, dword [edi + 0x74]
add esi, dword [esp + 0x6c]
xor ebp, ebp
jmp 0x405ac8
mov edx, 0xffffff
mov eax, dword [esp + 0x18]
and edx, dword [eax + ebp*4]
cmp edx, 0xffffff
jne 0x405aa4
mov eax, 7
and eax, ebp
mov ecx, 7
sub ecx, eax
mov ebx, 1
shl ebx, cl
mov eax, ebp
cdq
and edx, 7
add eax, edx
sar eax, 3
or byte [esi + eax], bl
mov eax, dword [esp + 0x28]
mov dword [eax + ebp*4], 0
jmp 0x405ac7
mov eax, 7
and eax, ebp
mov ecx, 7
sub ecx, eax
mov ebx, 0xfffffffe
rol ebx, cl
mov eax, ebp
cdq
and edx, 7
add eax, edx
sar eax, 3
and byte [esi + eax], bl
inc ebp
cmp ebp, dword [edi + 0x3c]
jl 0x405a60
mov eax, dword [esp + 0x50]
add eax, dword [esp + 0x8c]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x6c]
add eax, dword [esp + 0x90]
mov dword [esp + 0x6c], eax
inc dword [esp + 0x74]
mov eax, dword [esp + 0x74]
cmp eax, dword [edi + 0x40]
jl 0x405a37
add esp, 0x98
pop ebp
pop edi
pop esi
pop ebx
ret