Function at 0x404580
Capabilities:
Contain obfuscated stackstrings
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov eax, dword [esp + 0xc0]
mov dword [esp + 4], 0x41e07a
mov dword [esp], eax
call sym.openfile_char_const__char_const_
test eax, eax
je 0x4050bf
mov esi, dword [0x427068]
mov ebx, eax
test esi, 3
jne 0x4045e0
jmp 0x404620
mov edi, dword [0x427060]
mov byte [edi + esi], 0
mov eax, dword [0x427068]
lea esi, [eax + 1]
mov dword [0x427068], esi
test esi, 3
je 0x404620
cmp dword [0x427064], esi
jne 0x4045c0
mov eax, esi
add eax, eax
cmp eax, esi
jle 0x4045ea
mov dword [esp], eax
mov dword [0x427064], eax
call sym._malloc
mov edi, eax
test eax, eax
je sym.writeiqm_char_const___clone_.cold_
test esi, esi
jg 0x405090
mov dword [0x427060], edi
mov esi, dword [0x427068]
jmp 0x4045c6
mov esi, dword [0x4270e0]
test esi, 3
jne 0x404650
jmp 0x404690
mov edi, dword [0x4270d8]
mov byte [edi + esi], 0
mov eax, dword [0x4270e0]
lea esi, [eax + 1]
mov dword [0x4270e0], esi
test esi, 3
je 0x404690
cmp dword [0x4270dc], esi
jne 0x404630
mov eax, esi
add eax, eax
cmp eax, esi
jle 0x40465a
mov dword [esp], eax
mov dword [0x4270dc], eax
call sym._malloc
mov edi, eax
test eax, eax
je sym.writeiqm_char_const___clone_.cold_
test esi, esi
jg 0x405061
mov dword [0x4270d8], edi
mov esi, dword [0x4270e0]
jmp 0x404636
mov esi, dword [0x4270d4]
test esi, 3
jne 0x4046c0
jmp 0x404700
mov edi, dword [0x4270cc]
mov byte [edi + esi], 0
mov eax, dword [0x4270d4]
lea esi, [eax + 1]
mov dword [0x4270d4], esi
test esi, 3
je 0x404700
cmp dword [0x4270d0], esi
jne 0x4046a0
mov eax, esi
add eax, eax
cmp eax, esi
jle 0x4046ca
mov dword [esp], eax
mov dword [0x4270d0], eax
call sym._malloc
mov edi, eax
test eax, eax
je sym.writeiqm_char_const___clone_.cold_
test esi, esi
jg 0x405032
mov dword [0x4270cc], edi
mov esi, dword [0x4270d4]
jmp 0x4046a6
mov ebp, dword [0x427074]
test ebp, 1
jne 0x40472d
jmp 0x404772
mov esi, dword [0x42706c]
xor edx, edx
mov word [esi + ebp*2], dx
add ebp, 1
mov dword [0x427074], ebp
test ebp, 1
je 0x40476c
cmp dword [0x427070], ebp
jne 0x404710
mov eax, ebp
add eax, eax
cmp eax, ebp
jle 0x404737
mov dword [0x427070], eax
add eax, eax
mov dword [esp], eax
call sym._malloc
mov esi, eax
test eax, eax
je sym.writeiqm_char_const___clone_.cold_
test ebp, ebp
jg 0x405001
mov dword [0x42706c], esi
mov ebp, dword [0x427074]
jmp 0x404716
mov esi, dword [0x4270d4]
lea edx, [esp + 0x3c]
xor eax, eax
mov ecx, 0x19
mov dword [esp + 0x24], 0x45544e49
mov edi, edx
mov edx, dword [0x4270e0]
mov dword [esp + 0x28], 0x41555152
rep stosd dword es:[edi], eax
mov dword [esp + 0x2c], 0x4f4d454b
mov eax, 0x7c
mov dword [esp + 0x30], 0x4c4544
mov dword [esp + 0x34], 2
test edx, edx
je 0x4047c7
mov dword [esp + 0x44], 0x7c
lea eax, [edx + 0x7c]
mov dword [esp + 0x40], edx
mov edx, dword [0x4270c8]
mov dword [esp + 0x48], edx
test edx, edx
je 0x4047df
lea edx, [edx + edx*2]
mov dword [esp + 0x4c], eax
lea eax, [eax + edx*8]
mov edx, dword [0x4270ec]
lea ecx, [edx + edx*4]
mov dword [esp + 0x50], edx
lea ecx, [eax + ecx*4]
test edx, edx
je 0x4047f9
mov dword [esp + 0x58], eax
mov eax, ecx
mov edx, dword [0x427130]
mov edi, eax
add eax, dword [0x427068]
neg edi
and edi, 7
mov dword [esp + 0x54], edx
mov edx, dword [0x427098]
add ecx, edi
add eax, edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x5c], edx
test edx, edx
je 0x40483c
lea edx, [edx + edx*2]
mov dword [esp + 0x60], eax
lea eax, [eax + edx*4]
mov dword [esp + 0x38], eax
mov edx, dword [0x42708c]
test edx, edx
je 0x404854
lea edx, [edx + edx*2]
mov dword [esp + 0x64], eax
lea eax, [eax + edx*4]
mov dword [esp + 0x38], eax
mov edx, dword [0x4270bc]
mov dword [esp + 0x68], edx
test edx, edx
je 0x404872
lea edx, [edx + edx*2]
mov dword [esp + 0x6c], eax
shl edx, 4
add eax, edx
mov dword [esp + 0x38], eax
mov edx, dword [0x4270b0]
mov ecx, dword [0x4270a4]
mov dword [esp + 0x70], edx
test edx, edx
jne 0x404fce
mov dword [esp + 0x78], ecx
test ecx, ecx
je 0x4048a0
lea edx, [ecx + ecx*4]
mov dword [esp + 0x7c], eax
lea eax, [eax + edx*4]
mov dword [esp + 0x38], eax
xor edx, edx
xor eax, eax
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], eax
test ebp, ebp
je 0x4048c8
mov eax, dword [esp + 0x38]
mov dword [esp + 0x88], eax
lea eax, [eax + ebp*2]
mov dword [esp + 0x38], eax
mov eax, dword [0x427080]
test eax, eax
je 0x4048e5
mov edx, dword [esp + 0x38]
shl eax, 5
add eax, edx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x38], eax
test esi, esi
je 0x404901
mov eax, dword [esp + 0x38]
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], eax
add eax, esi
mov dword [esp + 0x38], eax
mov eax, dword [ebx]
lea edx, [esp + 0x24]
mov dword [esp + 4], 0x7c
mov ecx, ebx
mov dword [esp], edx
call dword [eax + 0x20]
mov eax, dword [0x4270e0]
sub esp, 8
test eax, eax
je 0x404939
mov edx, dword [ebx]
mov dword [esp + 4], eax
mov ecx, ebx
mov eax, dword [0x4270d8]
mov dword [esp], eax
call dword [edx + 0x20]
sub esp, 8
mov eax, dword [0x4270c8]
xor edi, edi
lea esi, [esp + 0x20]
test eax, eax
jle 0x404a12
lea esi, [esi]
mov eax, dword [0x4270c0]
lea edx, [edi + edi*2]
mov ecx, ebx
add edi, 1
lea ebp, [eax + edx*8]
mov eax, dword [ebp]
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [ebp + 4]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [ebp + 8]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [ebp + 0xc]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [ebp + 0x10]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [ebp + 0x14]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
sub esp, 8
cmp edi, dword [0x4270c8]
jl 0x404950
mov eax, dword [0x4270ec]
xor edi, edi
lea esi, [esp + 0x20]
test eax, eax
jle 0x404ad2
lea esi, [esi]
mov eax, dword [0x4270e4]
lea ecx, [edi + edi*4]
add edi, 1
lea ebp, [eax + ecx*4]
mov ecx, ebx
mov eax, dword [ebp]
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [ebp + 4]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [ebp + 8]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [ebp + 0xc]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov ecx, ebx
sub esp, 8
mov eax, dword [esp + 0x14]
add eax, dword [ebp + 0x10]
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
sub esp, 8
cmp edi, dword [0x4270ec]
jl 0x404a28
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x18]
xor esi, esi
test eax, eax
je 0x404af8
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp], 0
add esi, 1
call dword [eax + 0x28]
sub esp, 4
cmp esi, edi
jne 0x404ae0
mov edx, dword [0x427068]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], edx
mov edx, dword [0x427060]
mov dword [esp], edx
call dword [eax + 0x20]
mov eax, dword [0x427098]
xor edx, edx
sub esp, 8
lea esi, [esp + 0x20]
test eax, eax
jle 0x404b72
mov dword [esp + 0x14], esi
mov ebp, edx
lea esi, [esi]
mov edx, dword [0x427090]
lea eax, [ebp + ebp*2]
xor edi, edi
lea esi, [edx + eax*4]
mov eax, dword [esi + edi*4]
mov edx, dword [esp + 0x14]
mov ecx, ebx
add edi, 1
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], edx
call dword [eax + 0x20]
sub esp, 8
cmp edi, 3
jne 0x404b3f
add ebp, 1
cmp ebp, dword [0x427098]
jl 0x404b30
mov eax, dword [0x42708c]
xor edx, edx
lea esi, [esp + 0x20]
test eax, eax
jle 0x404bd2
mov dword [esp + 0x14], esi
mov ebp, edx
lea esi, [esi]
nop
mov edx, dword [0x427084]
lea eax, [ebp + ebp*2]
xor edi, edi
lea esi, [edx + eax*4]
mov eax, dword [esi + edi*4]
mov edx, dword [esp + 0x14]
mov ecx, ebx
add edi, 1
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], edx
call dword [eax + 0x20]
sub esp, 8
cmp edi, 3
jne 0x404b9f
add ebp, 1
cmp ebp, dword [0x42708c]
jl 0x404b90
mov ebp, dword [0x4270bc]
xor edx, edx
lea esi, [esp + 0x20]
test ebp, ebp
jle 0x404cc1
mov dword [esp + 0x14], edx
lea esi, [esi]
mov eax, dword [esp + 0x14]
mov ecx, ebx
xor ebp, ebp
lea edi, [eax + eax*2]
shl edi, 4
add edi, dword [0x4270b4]
mov eax, dword [edi]
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [edi + 4]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
sub esp, 8
fld dword [edi + ebp*4 + 8]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], 4
mov dword [esp], esi
add ebp, 1
fstp dword [esp + 0x20]
call dword [eax + 0x20]
sub esp, 8
cmp ebp, 3
jne 0x404c39
xor ebp, ebp
fld dword [edi + ebp*4 + 0x14]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], 4
mov dword [esp], esi
add ebp, 1
fstp dword [esp + 0x20]
call dword [eax + 0x20]
sub esp, 8
cmp ebp, 4
jne 0x404c60
xor ebp, ebp
fld dword [edi + ebp*4 + 0x24]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], 4
mov dword [esp], esi
add ebp, 1
fstp dword [esp + 0x20]
call dword [eax + 0x20]
sub esp, 8
cmp ebp, 3
jne 0x404c87
add dword [esp + 0x14], 1
mov eax, dword [esp + 0x14]
cmp eax, dword [0x4270bc]
jl 0x404bf0
mov edi, dword [0x4270b0]
mov dword [esp + 0x18], 0
lea esi, [esp + 0x20]
mov dword [esp + 0x14], 0
test edi, edi
jle 0x404dac
lea esi, [esi]
nop
mov edx, dword [esp + 0x18]
add edx, dword [0x4270a8]
mov ecx, ebx
mov eax, dword [edx]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov ecx, ebx
sub esp, 8
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 4]
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
sub esp, 8
mov edx, dword [esp + 0x1c]
lea ebp, [edx + 8]
lea edi, [edx + 0x30]
lea esi, [esi]
nop
fld dword [ebp]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], 4
mov dword [esp], esi
add ebp, 4
fstp dword [esp + 0x20]
call dword [eax + 0x20]
sub esp, 8
cmp edi, ebp
jne 0x404d40
mov edx, dword [esp + 0x1c]
lea ebp, [edx + 0x58]
lea esi, [esi]
fld dword [edi]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], 4
mov dword [esp], esi
add edi, 4
fstp dword [esp + 0x20]
call dword [eax + 0x20]
sub esp, 8
cmp ebp, edi
jne 0x404d70
add dword [esp + 0x14], 1
mov eax, dword [esp + 0x14]
add dword [esp + 0x18], 0x58
cmp eax, dword [0x4270b0]
jl 0x404ce8
mov ecx, dword [0x4270a4]
xor ebp, ebp
lea esi, [esp + 0x20]
test ecx, ecx
jle 0x404e66
mov eax, dword [0x42709c]
lea edx, [ebp + ebp*4]
mov ecx, ebx
add ebp, 1
lea edi, [eax + edx*4]
mov eax, dword [edi]
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [edi + 4]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [edi + 8]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
fld dword [edi + 0xc]
mov eax, dword [ebx]
mov ecx, ebx
sub esp, 8
mov dword [esp + 4], 4
fstp dword [esp + 0x20]
mov dword [esp], esi
call dword [eax + 0x20]
mov eax, dword [edi + 0x10]
mov ecx, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [eax + 0x20]
sub esp, 8
cmp ebp, dword [0x4270a4]
jl 0x404dc0
mov edx, dword [0x427074]
xor edi, edi
lea esi, [esp + 0x20]
test edx, edx
jle 0x404eae
lea esi, [esi]
lea esi, [esi]
mov eax, dword [0x42706c]
mov ecx, ebx
movzx eax, word [eax + edi*2]
add edi, 1
mov word [esp + 0x20], ax
mov eax, dword [ebx]
mov dword [esp + 4], 2
mov dword [esp], esi
call dword [eax + 0x20]
sub esp, 8
cmp edi, dword [0x427074]
jl 0x404e80
mov eax, dword [0x427080]
xor edx, edx
lea esi, [esp + 0x20]
test eax, eax
jle 0x404f72
mov dword [esp + 0x14], edx
lea esi, [esi]
mov edx, dword [esp + 0x14]
xor edi, edi
shl edx, 5
add edx, dword [0x427078]
mov ebp, edx
fld dword [ebp + edi*4]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], 4
mov dword [esp], esi
add edi, 1
fstp dword [esp + 0x20]
call dword [eax + 0x20]
sub esp, 8
cmp edi, 3
jne 0x404ed9
xor edi, edi
fld dword [ebp + edi*4 + 0xc]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], 4
mov dword [esp], esi
add edi, 1
fstp dword [esp + 0x20]
call dword [eax + 0x20]
sub esp, 8
cmp edi, 3
jne 0x404f00
fld dword [ebp + 0x18]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 4], 4
mov dword [esp], esi
fstp dword [esp + 0x20]
call dword [eax + 0x20]
fld dword [ebp + 0x1c]
mov eax, dword [ebx]
mov ecx, ebx
sub esp, 8
mov dword [esp + 4], 4
mov dword [esp], esi
fstp dword [esp + 0x20]
call dword [eax + 0x20]
sub esp, 8
add dword [esp + 0x14], 1
mov eax, dword [esp + 0x14]
cmp eax, dword [0x427080]
jl 0x404ec8
mov eax, dword [0x4270d4]
test eax, eax
je 0x404f91
mov edx, dword [ebx]
mov dword [esp + 4], eax
mov ecx, ebx
mov eax, dword [0x4270cc]
mov dword [esp], eax
call dword [edx + 0x20]
sub esp, 8
mov eax, dword [ebx]
mov eax, dword [eax + 4]
cmp eax, sym.filestream::filestream__
jne 0x4050cc
mov eax, dword [ebx + 4]
mov dword [ebx], vtable.A.0
test eax, eax
je 0x404fb6
mov dword [esp], eax
call sym._fclose
mov dword [esp], ebx
call sym._free
add esp, 0xac
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
imul edx, edx, 0x58
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
add edx, eax
mov dword [esp + 0x38], edx
test ecx, ecx
je 0x404ff1
lea eax, [ecx + ecx*4]
mov dword [esp + 0x7c], edx
lea eax, [edx + eax*4]
mov dword [esp + 0x38], eax
mov edx, dword [0x42715c]
mov eax, dword [0x427160]
jmp 0x4048a4
mov edi, dword [0x42706c]
add ebp, ebp
mov dword [esp], eax
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
call sym._memcpy
mov dword [esp], edi
call sym._free
mov dword [0x42706c], esi
mov ebp, dword [0x427074]
jmp 0x404716
mov ebp, dword [0x4270cc]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], ebp
call sym._memcpy
mov dword [esp], ebp
call sym._free
mov dword [0x4270cc], edi
mov esi, dword [0x4270d4]
jmp 0x4046a6
mov ebp, dword [0x4270d8]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], ebp
call sym._memcpy
mov dword [esp], ebp
call sym._free
mov dword [0x4270d8], edi
mov esi, dword [0x4270e0]
jmp 0x404636
mov ebp, dword [0x427060]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], ebp
call sym._memcpy
mov dword [esp], ebp
call sym._free
mov dword [0x427060], edi
mov esi, dword [0x427068]
jmp 0x4045c6
add esp, 0xac
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, ebx
call eax
jmp 0x404fbe