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

Disassembly:
sub esp, 0x1dc
push ebx
push ebp
push esi
push edi
push 1
xor ebx, ebx
push str.config.ini
lea eax, [esp + 0x164]
mov dword [esp + 0x20], ebx
call fcn.00406d30
mov eax, dword [esp + 0x15c]
mov ecx, dword [eax + 4]
test byte [esp + ecx + 0x164], 6
jne 0x4060f7
mov dword [esp + 0x90], 0xf
mov dword [esp + 0x8c], ebx
mov byte [esp + 0x7c], bl
mov eax, dword [eax + 4]
push 0xa
lea eax, [esp + eax + 0x160]
call fcn.0040b7c0
movzx edx, al
push edx
lea eax, [esp + 0x160]
push eax
lea ebx, [esp + 0x80]
call fcn.0040cc20
add esp, 8
mov ecx, str._General_
mov edi, ebx
call fcn.00403a80
test al, al
je 0x406091
mov ecx, dword [esp + 0x15c]
mov eax, dword [ecx + 4]
push 0xa
lea eax, [esp + eax + 0x160]
call fcn.0040b7c0
movzx edx, al
push edx
lea eax, [esp + 0x160]
push eax
call fcn.0040cc20
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + eax + 8]
add ecx, eax
and dl, 6
movsx eax, dl
add esp, 8
neg eax
sbb eax, eax
not eax
test ecx, eax
je 0x406091
push 1
lea ecx, [esp + 0x7c]
push ecx
call fcn.00407e90
mov esi, eax
cmp esi, 0xffffffff
je 0x406041
push esi
xor ebp, ebp
push ebp
lea edx, [esp + 0x80]
mov ebx, 0xf
push edx
lea ecx, [esp + 0x64]
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x78], ebp
mov byte [esp + 0x68], 0
call fcn.004034f0
push 0xffffffffffffffff
inc esi
push esi
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebp
mov byte [esp + 0x2c], 0
call fcn.004034f0
mov esi, dword [esp + 0x6c]
mov eax, esi
cmp esi, 1
jb 0x4058ba
lea eax, [ebx - 0xe]
cmp dword [esp + 0x70], 0x10
mov edx, dword [esp + 0x5c]
jae 0x4058c9
lea edx, [esp + 0x5c]
mov ecx, 0x45bbd4
call fcn.00401760
cmp eax, ebp
jne 0x4059a0
cmp esi, 1
jb 0x4059a0
xor eax, eax
cmp esi, 1
setne al
cmp eax, ebp
jne 0x4059a0
lea ecx, [esp + 0x1c]
push ecx
lea eax, [esp + 0xa0]
call fcn.00407520
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x94]
cmp eax, ebx
jge 0x40592f
mov eax, dword [esp + 0x1f0]
mov dword [eax], ebx
jmp 0x405938
mov ecx, dword [esp + 0x1f0]
mov dword [ecx], eax
mov edx, dword [esp + 0x9c]
mov eax, dword [edx + 4]
mov dword [esp + eax + 0x9c], vtable.std::basic_istringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
lea esi, [esp + 0xa4]
mov dword [esp + 0xa4], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
call fcn.00408420
mov ecx, esi
call fcn.00406a40
mov ecx, dword [esp + 0x9c]
mov edx, dword [ecx + 4]
lea eax, [esp + 0xec]
mov dword [esp + edx + 0x9c], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
push eax
mov dword [esp + 0xf0], vtable.std::ios_base.0
call fcn.00426c4a
add esp, 4
jmp 0x406005
mov ecx, 0x45bbd8
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x4059fe
lea ecx, [esp + 0x1c]
push ecx
lea eax, [esp + 0xa0]
call fcn.00407520
lea edx, [esp + 0x98]
push edx
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x98]
cmp eax, ebx
jge 0x4059f0
mov eax, dword [esp + 0x1f4]
mov dword [eax], ebx
jmp 0x405ff9
mov ecx, dword [esp + 0x1f4]
mov dword [ecx], eax
jmp 0x405ff9
mov ecx, 0x45bbdc
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405a6e
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0xa0]
call fcn.00407520
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x40]
cmp eax, ebp
jge 0x405a3e
xor eax, eax
jmp 0x405a48
cmp eax, 0x3f
jle 0x405a4c
mov eax, 0x3f
mov dword [esp + 0x40], eax
mov dword [0x4687cc], eax
test al, 2
je 0x405ff9
test al, 4
je 0x405ff9
add eax, 0xfffffffc
mov dword [0x4687cc], eax
jmp 0x405ff9
mov ecx, 0x45bbe4
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405ad2
lea ecx, [esp + 0x1c]
push ecx
lea eax, [esp + 0xa0]
call fcn.00407520
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x50]
cmp eax, ebp
jge 0x405aba
xor eax, eax
mov dword [esp + 0x50], eax
mov dword [0x4687d0], eax
jmp 0x405ff9
cmp eax, 1
jle 0x405ac8
mov eax, 1
mov dword [esp + 0x50], eax
mov dword [0x4687d0], eax
jmp 0x405ff9
mov ecx, 0x45bbf0
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405b36
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0xa0]
call fcn.00407520
lea ecx, [esp + 0x54]
push ecx
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x54]
cmp eax, ebp
jge 0x405b1e
xor eax, eax
mov dword [esp + 0x54], eax
mov dword [0x4687d4], eax
jmp 0x405ff9
cmp eax, 8
jle 0x405b2c
mov eax, 8
mov dword [esp + 0x54], eax
mov dword [0x4687d4], eax
jmp 0x405ff9
mov ecx, 0x45bbf8
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405bf6
mov ecx, 0x45ba10
lea edi, [esp + 0x1c]
call fcn.00403a80
mov ebx, dword [esp + 0x18]
test al, al
jne 0x405b9f
mov edx, edi
or ebx, 3
push edx
mov eax, str.lang_
lea edi, [esp + 0x128]
mov dword [esp + 0x1c], ebx
call fcn.0040bad0
add esp, 4
mov edi, str..lng
lea esi, [esp + 0x140]
call fcn.0040bb50
call fcn.00405740
mov byte [esp + 0x17], 1
test al, al
jne 0x405ba4
mov byte [esp + 0x17], 0
test bl, 2
je 0x405bbc
and ebx, 0xfffffffd
lea ecx, [esp + 0x140]
mov dword [esp + 0x18], ebx
call fcn.004034c0
test bl, 1
je 0x405bd4
and ebx, 0xfffffffe
lea ecx, [esp + 0x124]
mov dword [esp + 0x18], ebx
call fcn.004034c0
cmp byte [esp + 0x17], 0
je 0x406005
push 0xffffffffffffffff
push ebp
lea eax, [esp + 0x24]
push eax
mov ecx, 0x4688b4
call fcn.004034f0
jmp 0x406005
mov ecx, 0x45bc10
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405cb6
mov ecx, 0x45ba10
lea edi, [esp + 0x1c]
call fcn.00403a80
mov ebx, dword [esp + 0x18]
test al, al
jne 0x405c5f
mov ecx, edi
or ebx, 0xc
push ecx
mov eax, str.presets_
lea edi, [esp + 0x144]
mov dword [esp + 0x1c], ebx
call fcn.0040bad0
add esp, 4
mov edi, str..toy
lea esi, [esp + 0x124]
call fcn.0040bb50
call fcn.00405740
mov byte [esp + 0x17], 1
test al, al
jne 0x405c64
mov byte [esp + 0x17], 0
test bl, 8
je 0x405c7c
and ebx, 0xfffffff7
lea ecx, [esp + 0x124]
mov dword [esp + 0x18], ebx
call fcn.004034c0
test bl, 4
je 0x405c94
and ebx, 0xfffffffb
lea ecx, [esp + 0x140]
mov dword [esp + 0x18], ebx
call fcn.004034c0
cmp byte [esp + 0x17], 0
je 0x406005
push 0xffffffffffffffff
push ebp
lea edx, [esp + 0x24]
push edx
mov ecx, 0x4688d0
call fcn.004034f0
jmp 0x406005
mov ecx, str.Format1
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405d1c
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0xa0]
call fcn.00407520
lea ecx, [esp + 0x44]
push ecx
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x44]
cmp eax, ebp
jge 0x405d02
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [0x4687d8], eax
jmp 0x405ff9
cmp eax, 0xff
jle 0x405d12
mov eax, 0xff
mov dword [esp + 0x44], eax
mov dword [0x4687d8], eax
jmp 0x405ff9
mov ecx, str.Format2
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405d82
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0xa0]
call fcn.00407520
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x4c]
cmp eax, ebp
jge 0x405d68
xor eax, eax
mov dword [esp + 0x4c], eax
mov dword [0x4687dc], eax
jmp 0x405ff9
cmp eax, 0xff
jle 0x405d78
mov eax, 0xff
mov dword [esp + 0x4c], eax
mov dword [0x4687dc], eax
jmp 0x405ff9
mov ecx, str.Format3
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405de8
lea ecx, [esp + 0x1c]
push ecx
lea eax, [esp + 0xa0]
call fcn.00407520
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x48]
cmp eax, ebp
jge 0x405dce
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [0x4687e0], eax
jmp 0x405ff9
cmp eax, 0xff
jle 0x405dde
mov eax, 0xff
mov dword [esp + 0x48], eax
mov dword [0x4687e0], eax
jmp 0x405ff9
mov ecx, str.Format4
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405e48
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0xa0]
call fcn.00407520
lea ecx, [esp + 0x3c]
push ecx
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x3c]
cmp eax, ebp
jge 0x405e34
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [0x4687e4], eax
jmp 0x405ff9
cmp eax, ebx
jle 0x405e3e
mov eax, ebx
mov dword [esp + 0x3c], eax
mov dword [0x4687e4], eax
jmp 0x405ff9
mov ecx, 0x45bc38
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405e94
mov ecx, 0x45ba10
lea edi, [esp + 0x1c]
call fcn.00403a80
test al, al
jne 0x406005
mov eax, edi
call fcn.00405740
test al, al
je 0x406005
push 0xffffffffffffffff
push ebp
mov edx, edi
push edx
mov ecx, 0x468898
call fcn.004034f0
jmp 0x406005
mov ecx, 0x45bc40
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405f54
mov ecx, 0x45ba10
lea edi, [esp + 0x1c]
call fcn.00403a80
mov ebx, dword [esp + 0x18]
test al, al
jne 0x405efd
mov eax, edi
push eax
or ebx, 0x30
mov eax, str.skin_
lea edi, [esp + 0x144]
mov dword [esp + 0x1c], ebx
call fcn.0040bad0
add esp, 4
mov edi, str..png
lea esi, [esp + 0x124]
call fcn.0040bb50
call fcn.00405740
mov byte [esp + 0x17], 1
test al, al
jne 0x405f02
mov byte [esp + 0x17], 0
test bl, 0x20
je 0x405f1a
and ebx, 0xffffffdf
lea ecx, [esp + 0x124]
mov dword [esp + 0x18], ebx
call fcn.004034c0
test bl, 0x10
je 0x405f32
and ebx, 0xffffffef
lea ecx, [esp + 0x140]
mov dword [esp + 0x18], ebx
call fcn.004034c0
cmp byte [esp + 0x17], 0
je 0x406005
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0x24]
push ecx
mov ecx, 0x4688ec
call fcn.004034f0
jmp 0x406005
mov ecx, 0x45bc58
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x405fb2
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0xa0]
call fcn.00407520
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x38]
cmp eax, ebp
jge 0x405f9d
xor eax, eax
mov dword [esp + 0x38], eax
mov dword [0x4687e8], eax
jmp 0x405ff9
cmp eax, 1
jle 0x405fab
mov eax, 1
mov dword [esp + 0x38], eax
mov dword [0x4687e8], eax
jmp 0x405ff9
mov ecx, 0x45bc60
lea edi, [esp + 0x58]
call fcn.00403a80
test al, al
je 0x406005
lea ecx, [esp + 0x1c]
push ecx
lea eax, [esp + 0xa0]
call fcn.00407520
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0xa0]
call fcn.004068e0
mov eax, dword [esp + 0x74]
cmp eax, ebp
jge 0x405ff4
xor eax, eax
mov dword [esp + 0x74], eax
mov dword [0x4687ec], eax
lea eax, [esp + 0x9c]
call fcn.00406170
mov esi, 0x10
cmp dword [esp + 0x34], esi
jb 0x40601d
mov eax, dword [esp + 0x20]
push eax
call fcn.00427d3a
add esp, 4
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], ebp
mov byte [esp + 0x20], 0
cmp dword [esp + 0x70], esi
jb 0x406041
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.00427d3a
add esp, 4
mov edx, dword [esp + 0x15c]
mov eax, dword [edx + 4]
push 0xa
lea eax, [esp + eax + 0x160]
call fcn.0040b7c0
movzx eax, al
push eax
lea ecx, [esp + 0x160]
push ecx
lea ebx, [esp + 0x80]
call fcn.0040cc20
mov edx, dword [eax]
mov ecx, dword [edx + 4]
add ecx, eax
mov eax, dword [ecx + 8]
and al, 6
movsx edx, al
add esp, 8
neg edx
sbb edx, edx
not edx
test ecx, edx
jne 0x40584c
push 0x9c
call fcn.00427ed0
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x4060c4
mov eax, dword [esp + 0x1f4]
mov edx, dword [esp + 0x1f0]
mov ecx, dword [eax]
mov eax, dword [edx]
call fcn.00405460
mov dword [0x4687b4], eax
jmp 0x4060ca
mov dword [0x4687b4], ebx
cmp dword [esp + 0x90], 0x10
jb 0x4060e1
mov eax, dword [esp + 0x7c]
push eax
call fcn.00427d3a
add esp, 4
mov dword [esp + 0x90], 0xf
mov dword [esp + 0x8c], ebx
mov byte [esp + 0x7c], bl
lea eax, [esp + 0x15c]
call fcn.00406110
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1dc
ret