Function at 0x40f380
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x465890
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2f4
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.Program
push 0x83
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x40f3dd
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40f3f0
mov ebx, dword [ebp - 0x14]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x34], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 4], 0
mov dword [ebp - 0xa0], 0xf
mov dword [ebp - 0x38], eax
xor eax, eax
mov dword [ebp - 0xa4], eax
mov byte [ebp - 0xb4], al
lea edx, [ebp - 0xb8]
add esp, 0xfffffff8
mov dword [esp], edx
mov dword [esp + 4], ecx
call fcn.00410690
lea eax, [ebp - 0x274]
push 0x104
push 0
push eax
call fcn.00461ca0
add esp, 0x14
lea eax, [ebp - 0x274]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x40f867
cmp eax, 0x104
ja 0x40f867
mov dword [ebp - 0xdc], 0xf
lea ecx, [ebp - 0x274]
xor eax, eax
mov dword [ebp - 0xe0], eax
mov byte [ebp - 0xf0], al
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x40f4b4
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x40f49f
dec eax
mov esi, eax
mov edi, dword [ebp - 0xdc]
lea eax, [ebp - 0xf4]
mov dword [ebp - 0x50], eax
lea edx, [ebp - 0x274]
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], esi
cmp edi, 0x10
jb 0x40f4de
mov edx, dword [ebp - 0xf0]
jmp 0x40f4e4
lea edx, [ebp - 0xf0]
lea eax, [ebp - 0x274]
cmp eax, edx
jae 0x410644
xor eax, eax
test eax, eax
jne 0x40f531
mov dword [ebp - 0x84], esi
cmp esi, 0xfffffffe
jbe 0x40f50e
call fcn.00461214
mov edi, dword [ebp - 0xdc]
cmp edi, esi
jb 0x40f926
test esi, esi
je 0x40f901
mov eax, dword [ebp - 0x84]
test eax, eax
ja 0x40f8ba
jmp 0x40f5cf
cmp edi, 0x10
jb 0x40f53e
mov edx, dword [ebp - 0xf0]
jmp 0x40f544
lea edx, [ebp - 0xf0]
lea eax, [ebp - 0xf4]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
lea edi, [ebp - 0x274]
sub edi, edx
mov edx, dword [ebp - 0xe0]
mov dword [ebp - 0x78], edi
cmp edx, edi
jb 0x40f577
mov eax, edx
sub eax, edi
cmp esi, eax
jb 0x40f56f
mov esi, eax
mov dword [ebp - 0x88], esi
jmp 0x40f595
call fcn.00461253
mov edx, dword [ebp - 0xe0]
mov edi, dword [ebp - 0x78]
mov eax, edx
sub eax, edi
cmp esi, eax
jb 0x40f58f
mov esi, eax
mov dword [ebp - 0x88], esi
add edi, esi
cmp edx, edi
jae 0x40f5a6
call fcn.00461253
mov edx, dword [ebp - 0xe0]
mov eax, edx
sub eax, edi
cmp eax, 0xffffffff
mov ebx, eax
jb 0x40f5b6
mov ebx, 0xffffffff
test ebx, ebx
ja 0x4105d0
mov ebx, dword [ebp - 0x78]
cmp edx, ebx
jae 0x40f5c7
mov ebx, edx
test ebx, ebx
ja 0x410569
mov dword [ebp - 4], 0xd
lea eax, [ebp - 0x110]
lea edx, [ebp - 0xf4]
add esp, 0xfffffff4
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], 0x4679c0
call fcn.0040e1c0
add esp, 0xc
mov dword [ebp - 4], 0xe
lea eax, [ebp - 0x12c]
lea edx, [ebp - 0x110]
lea ecx, [ebp - 0xb8]
add esp, 0xfffffff4
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
call fcn.0040d770
add esp, 0xc
mov dword [ebp - 4], 0xf
mov dword [ebp - 0x54], 0
lea ebx, [ebp - 0xb8]
lea eax, [ebp - 0x12c]
mov esi, dword [eax + 0x14]
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x64], esi
cmp ebx, eax
je 0x41046e
mov dword [ebp - 0x74], esi
cmp esi, 0xfffffffe
jbe 0x40f669
call fcn.00461214
mov esi, dword [ebp - 0x74]
cmp esi, dword [ebx + 0x18]
ja 0x41029a
test esi, esi
je 0x410271
test esi, esi
ja 0x410216
mov dword [ebp - 4], 0xe
mov eax, dword [ebp - 0x114]
cmp eax, 0x10
jae 0x410205
mov dword [ebp - 4], 0xd
mov edx, dword [ebp - 0xf8]
mov dword [ebp - 0x114], 0xf
xor eax, eax
cmp edx, 0x10
mov dword [ebp - 0x118], eax
mov byte [ebp - 0x28], al
mov byte [ebp - 0x128], al
jae 0x4101f4
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0xdc]
mov dword [ebp - 0xf8], 0xf
xor eax, eax
cmp edx, 0x10
mov dword [ebp - 0xfc], eax
mov byte [ebp - 0x24], al
mov byte [ebp - 0x10c], al
jae 0x4101e3
mov dword [ebp - 0xdc], 0xf
lea ecx, [ebp - 0xb8]
xor ebx, ebx
mov dword [ebp - 0xe0], ebx
mov byte [ebp - 0x20], bl
mov byte [ebp - 0xf0], bl
mov byte [ebp - 0x30], bl
call fcn.0040eea0
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x6c], eax
cmp eax, 0xffffffff
je 0x40f7c3
lea edx, [ebp - 0x68]
push 0
push edx
push dword [ebp - 0x38]
push dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f7c3
mov eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x38]
jne 0x40f7c3
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x8c], 0
lea eax, [ebp - 0xb8]
mov esi, dword [eax + 0x14]
mov dword [ebp - 0x94], ebx
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x98], esi
cmp ebx, eax
je 0x40fd83
mov dword [ebp - 0x9c], esi
cmp esi, 0xfffffffe
jbe 0x40f7a6
call fcn.00461214
mov esi, dword [ebp - 0x9c]
cmp esi, dword [ebx + 0x18]
ja 0x40fbac
test esi, esi
je 0x40fb86
test esi, esi
ja 0x40fb1f
mov byte [ebp - 0x30], 1
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x3c], 0
lea eax, [ebp - 0xb8]
mov esi, dword [eax + 0x14]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x60], esi
cmp ebx, eax
je 0x4100e9
mov dword [ebp - 0x70], esi
cmp esi, 0xfffffffe
jbe 0x40f7f7
call fcn.00461214
mov esi, dword [ebp - 0x70]
cmp esi, dword [ebx + 0x18]
ja 0x40ff15
test esi, esi
je 0x40feef
test esi, esi
ja 0x40fe94
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
movzx ebx, byte [ebp - 0x30]
mov eax, dword [ebp - 0xa0]
cmp eax, 0x10
jae 0x40fe83
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0xa0], 0xf
xor edx, edx
mov dword [ebp - 0xa4], edx
mov eax, ebx
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x2c], dl
mov byte [ebp - 0xb4], dl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xa0]
cmp eax, 0x10
jae 0x410675
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x14]
xor edx, edx
mov dword [ebp - 0xa4], edx
xor eax, eax
mov dword [ebp - 0xa0], 0xf
mov byte [ebp - 0xb4], dl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x50]
mov eax, dword [ebx + 0x18]
cmp eax, 0x10
jb 0x40f8ca
mov edx, dword [ebx + 4]
jmp 0x40f8cd
lea edx, [ebx + 4]
mov esi, dword [ebp - 0x48]
push esi
push dword [ebp - 0x4c]
push eax
push edx
call fcn.0044a80e
add esp, 0x10
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x14], esi
cmp eax, 0x10
jb 0x40f8ee
mov ebx, dword [ebx + 4]
jmp 0x40f8f1
add ebx, 4
xor eax, eax
mov byte [ebp - 0x130], al
mov byte [ebx + esi], al
jmp 0x40f5cf
mov dword [ebp - 0xe0], 0
cmp edi, 0x10
jb 0x40f918
mov eax, dword [ebp - 0xf0]
jmp 0x40f91e
lea eax, [ebp - 0xf0]
mov byte [eax], 0
jmp 0x40f51e
mov edx, dword [ebp - 0xe0]
mov dword [ebp - 0x27c], esi
mov ebx, esi
lea eax, [ebp - 0xf4]
or ebx, 0xf
cmp ebx, 0xfffffffe
mov dword [ebp - 0x280], eax
mov dword [ebp - 0x278], edx
mov dword [ebp - 0x288], ebx
jbe 0x40f95e
mov dword [ebp - 0x288], esi
mov ebx, esi
jmp 0x40f973
mov ecx, edi
shr ecx, 1
mov eax, 0xaaaaaaab
mul ebx
shr edx, 1
cmp ecx, edx
ja 0x40fade
mov dword [ebp - 4], 9
mov dword [ebp - 0x284], 0
inc ebx
jne 0x40f98b
xor ebx, ebx
jmp 0x40f9d0
xor edx, edx
mov eax, 0xffffffff
div ebx
cmp eax, 1
jae 0x40f9d0
mov dword [ebp - 0x2c8], 0
lea eax, [ebp - 0x2c8]
push eax
lea ecx, [ebp - 0x2f4]
call fcn.0044a5f3
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
lea eax, [ebp - 0x2f4]
push 0x475b08
push eax
call fcn.0044ab8b
push edi
mov dword [esp], ebx
call fcn.0042e777
pop ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x284], eax
mov dword [ebp - 4], 0
nop
mov esi, dword [ebp - 0x278]
test esi, esi
ja 0x40faab
mov edi, dword [ebp - 0x280]
mov eax, dword [edi + 0x18]
mov ebx, edi
cmp eax, 0x10
jae 0x40fa91
mov ecx, dword [ebp - 0x284]
mov edx, dword [ebp - 0x288]
mov dword [ebx + 0x18], 0xf
xor eax, eax
mov byte [ebp - 0x138], al
mov byte [ebp - 0x134], al
mov dword [ebx + 0x14], eax
mov byte [ebx + 4], al
mov dword [edi + 4], ecx
mov dword [edi + 0x18], edx
mov dword [edi + 0x14], esi
add edi, 4
cmp edx, 0x10
jae 0x40fa4b
mov ecx, edi
mov byte [ecx + esi], al
jmp 0x40f51e
push dword [edi + 4]
call fcn.0042e7a2
pop ecx
mov edi, dword [ebp - 0x280]
mov esi, dword [ebp - 0x278]
jmp 0x40fa11
mov edi, dword [ebp - 0x280]
mov eax, dword [edi + 0x18]
cmp eax, 0x10
jb 0x40fabe
mov eax, dword [edi + 4]
jmp 0x40fac1
lea eax, [edi + 4]
mov edx, dword [ebp - 0x288]
push esi
push eax
inc edx
push edx
push dword [ebp - 0x284]
call fcn.0044a80e
add esp, 0x10
jmp 0x40fa03
mov eax, ecx
neg eax
add eax, 0xfffffffe
cmp edi, eax
ja 0x40f973
lea ebx, [edi + ecx]
mov dword [ebp - 0x288], ebx
jmp 0x40f973
mov esi, dword [ebp - 0x94]
mov ecx, dword [esi + 0x18]
cmp ecx, 0x10
jb 0x40fb32
mov edi, dword [esi + 4]
jmp 0x40fb35
lea edi, [esi + 4]
mov edx, dword [ebp - 0x90]
mov eax, dword [edx + 0x18]
cmp eax, 0x10
jb 0x40fb48
mov edx, dword [edx + 4]
jmp 0x40fb4b
add edx, 4
add edx, dword [ebp - 0x8c]
mov ebx, dword [ebp - 0x98]
push ebx
push edx
push ecx
push edi
call fcn.0044a80e
add esp, 0x10
mov eax, dword [esi + 0x18]
mov dword [esi + 0x14], ebx
cmp eax, 0x10
jb 0x40fb73
mov esi, dword [esi + 4]
jmp 0x40fb76
add esi, 4
xor eax, eax
mov byte [ebp - 0x13c], al
mov byte [esi + ebx], al
jmp 0x40f7bf
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x14], 0
cmp eax, 0x10
jb 0x40fb9a
mov edx, dword [ebx + 4]
jmp 0x40fb9d
lea edx, [ebx + 4]
xor eax, eax
mov byte [ebp - 0x148], al
mov byte [edx], al
jmp 0x40f7b7
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x2a4], ebx
mov edi, esi
mov dword [ebp - 0x2a0], esi
or edi, 0xf
cmp edi, 0xfffffffe
mov dword [ebp - 0x29c], eax
mov dword [ebp - 0x2ac], edi
jbe 0x40fbdb
mov dword [ebp - 0x2ac], esi
mov edi, esi
jmp 0x40fbf3
mov ebx, dword [ebx + 0x18]
mov ecx, ebx
shr ecx, 1
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
cmp ecx, edx
ja 0x40fd66
mov dword [ebp - 4], 5
mov dword [ebp - 0x2a8], 0
inc edi
jne 0x40fc0b
xor edi, edi
jmp 0x40fc4e
xor edx, edx
mov eax, 0xffffffff
div edi
cmp eax, 1
jae 0x40fc4e
mov dword [ebp - 0x2cc], 0
lea ebx, [ebp - 0x300]
mov ecx, ebx
lea eax, [ebp - 0x2cc]
push eax
call fcn.0044a5f3
mov dword [ebx], vtable.std::bad_alloc.0
lea eax, [ebp - 0x300]
push 0x475b08
push eax
call fcn.0044ab8b
push edi
mov dword [esp], edi
call fcn.0042e777
pop ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 4], 0
nop
mov esi, dword [ebp - 0x29c]
test esi, esi
ja 0x40fd33
mov edi, dword [ebp - 0x2a4]
mov eax, dword [edi + 0x18]
mov ebx, edi
cmp eax, 0x10
jae 0x40fd19
mov dword [ebx + 0x18], 0xf
mov dword [ebx + 0x14], 0
mov ecx, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2ac]
xor eax, eax
mov byte [ebp - 0x144], al
mov byte [ebx + 4], al
mov byte [ebp - 0x140], al
mov dword [edi + 4], ecx
mov dword [edi + 0x18], edx
mov dword [edi + 0x14], esi
add edi, 4
cmp edx, 0x10
jae 0x40fccd
mov ecx, edi
mov byte [ecx + esi], al
mov esi, dword [ebp - 0x9c]
jmp 0x40f7b7
push dword [edi + 4]
call fcn.0042e7a2
pop ecx
mov edi, dword [ebp - 0x2a4]
mov esi, dword [ebp - 0x29c]
jmp 0x40fc8f
mov edi, dword [ebp - 0x2a4]
mov eax, dword [edi + 0x18]
cmp eax, 0x10
jb 0x40fd46
mov eax, dword [edi + 4]
jmp 0x40fd49
lea eax, [edi + 4]
mov edx, dword [ebp - 0x2ac]
push esi
push eax
inc edx
push edx
push dword [ebp - 0x2a8]
call fcn.0044a80e
add esp, 0x10
jmp 0x40fc81
mov eax, ecx
neg eax
add eax, 0xfffffffe
cmp ebx, eax
ja 0x40fbf3
lea edi, [ebx + ecx]
mov dword [ebp - 0x2ac], edi
jmp 0x40fbf3
cmp esi, dword [ebx + 0x14]
jbe 0x40fd8d
call fcn.00461253
mov eax, dword [ebx + 0x14]
sub eax, esi
cmp eax, 0xffffffff
mov edi, eax
jb 0x40fd9e
mov edi, 0xffffffff
test edi, edi
ja 0x40fe15
mov ebx, dword [ebp - 0x94]
mov esi, dword [ebp - 0x8c]
mov edx, dword [ebx + 0x14]
cmp edx, esi
jae 0x40fdb7
mov esi, edx
test esi, esi
jbe 0x40f7bf
mov eax, dword [ebx + 0x18]
cmp eax, 0x10
jb 0x40fdcc
mov ecx, dword [ebx + 4]
jmp 0x40fdcf
lea ecx, [ebx + 4]
add esp, 0xfffffff0
mov dword [esp], ecx
mov dword [esp + 4], eax
add ecx, esi
mov dword [esp + 8], ecx
sub edx, esi
mov dword [esp + 0xc], edx
call fcn.0044abd5
add esp, 0x10
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x18]
sub edx, esi
mov dword [ebx + 0x14], edx
cmp eax, 0x10
jb 0x40fe02
mov ebx, dword [ebx + 4]
jmp 0x40fe05
add ebx, 4
xor eax, eax
mov byte [ebp - 0x2b0], al
mov byte [ebx + edx], al
jmp 0x40f7bf
mov edx, dword [ebx + 0x18]
cmp edx, 0x10
jb 0x40fe28
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x2d0], ecx
jmp 0x40fe31
lea ecx, [ebx + 4]
mov dword [ebp - 0x2d0], ecx
add esp, 0xfffffff0
sub edx, esi
mov dword [esp + 4], edx
sub eax, edi
mov ebx, ecx
mov dword [esp + 0xc], eax
lea ecx, [esi + ebx]
add esi, edi
add esi, ebx
mov ebx, dword [ebp + 0xc]
mov dword [esp], ecx
mov dword [esp + 8], esi
call fcn.0044abd5
add esp, 0x10
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x18]
sub ecx, edi
mov dword [ebx + 0x14], ecx
cmp eax, 0x10
jb 0x40fe70
mov edx, dword [ebx + 4]
jmp 0x40fe73
lea edx, [ebx + 4]
xor eax, eax
mov byte [ebp - 0x2b4], al
mov byte [edx + ecx], al
jmp 0x40fda2
push dword [ebp - 0xb4]
call fcn.0042e7a2
pop ecx
jmp 0x40f833
mov esi, dword [ebp - 0x44]
mov ecx, dword [esi + 0x18]
cmp ecx, 0x10
jb 0x40fea4
mov edi, dword [esi + 4]
jmp 0x40fea7
lea edi, [esi + 4]
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x18]
cmp eax, 0x10
jb 0x40feb7
mov edx, dword [edx + 4]
jmp 0x40feba
add edx, 4
add edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x60]
push ebx
push edx
push ecx
push edi
call fcn.0044a80e
add esp, 0x10
mov eax, dword [esi + 0x18]
mov dword [esi + 0x14], ebx
cmp eax, 0x10
jb 0x40fedc
mov esi, dword [esi + 4]
jmp 0x40fedf
add esi, 4
xor eax, eax
mov byte [ebp - 0xbc], al
mov byte [esi + ebx], al
jmp 0x40f810
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x14], 0
cmp eax, 0x10
jb 0x40ff03
mov edx, dword [ebx + 4]
jmp 0x40ff06
lea edx, [ebx + 4]
xor eax, eax
mov byte [ebp - 0xd4], al
mov byte [edx], al
jmp 0x40f808
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x154], ebx
mov edi, esi
mov dword [ebp - 0x150], esi
or edi, 0xf
cmp edi, 0xfffffffe
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x168], edi
jbe 0x40ff44
mov dword [ebp - 0x168], esi
mov edi, esi
jmp 0x40ff5c
mov ebx, dword [ebx + 0x18]
mov ecx, ebx
shr ecx, 1
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
cmp ecx, edx
ja 0x4100cc
mov dword [ebp - 4], 1
mov dword [ebp - 0x164], 0
inc edi
jne 0x40ff74
xor edi, edi
jmp 0x40ffb7
xor edx, edx
mov eax, 0xffffffff
div edi
cmp eax, 1
jae 0x40ffb7
mov dword [ebp - 0x2bc], 0
lea ebx, [ebp - 0x2dc]
mov ecx, ebx
lea eax, [ebp - 0x2bc]
push eax
call fcn.0044a5f3
mov dword [ebx], vtable.std::bad_alloc.0
lea eax, [ebp - 0x2dc]
push 0x475b08
push eax
call fcn.0044ab8b
push edi
mov dword [esp], edi
call fcn.0042e777
pop ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x164], eax
mov dword [ebp - 4], 0
nop
mov esi, dword [ebp - 0x14c]
test esi, esi
ja 0x410099
mov edi, dword [ebp - 0x154]
mov eax, dword [edi + 0x18]
mov ebx, edi
cmp eax, 0x10
jae 0x41007f
mov dword [ebx + 0x18], 0xf
mov dword [ebx + 0x14], 0
mov ecx, dword [ebp - 0x164]
mov edx, dword [ebp - 0x168]
xor eax, eax
mov byte [ebp - 0xc4], al
mov byte [ebx + 4], al
mov byte [ebp - 0xc0], al
mov dword [edi + 4], ecx
mov dword [edi + 0x18], edx
mov dword [edi + 0x14], esi
add edi, 4
cmp edx, 0x10
jae 0x410036
mov ecx, edi
mov byte [ecx + esi], al
mov esi, dword [ebp - 0x70]
jmp 0x40f808
push dword [edi + 4]
call fcn.0042e7a2
pop ecx
mov edi, dword [ebp - 0x154]
mov esi, dword [ebp - 0x14c]
jmp 0x40fff8
mov edi, dword [ebp - 0x154]
mov eax, dword [edi + 0x18]
cmp eax, 0x10
jb 0x4100ac
mov eax, dword [edi + 4]
jmp 0x4100af
lea eax, [edi + 4]
mov edx, dword [ebp - 0x168]
push esi
push eax
inc edx
push edx
push dword [ebp - 0x164]
call fcn.0044a80e
add esp, 0x10
jmp 0x40ffea
mov eax, ecx
neg eax
add eax, 0xfffffffe
cmp ebx, eax
ja 0x40ff5c
lea edi, [ebx + ecx]
mov dword [ebp - 0x168], edi
jmp 0x40ff5c
cmp esi, dword [ebx + 0x14]
jbe 0x4100f3
call fcn.00461253
mov eax, dword [ebx + 0x14]
sub eax, esi
cmp eax, 0xffffffff
mov edi, eax
jb 0x410104
mov edi, 0xffffffff
test edi, edi
ja 0x410175
mov ebx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x3c]
mov edx, dword [ebx + 0x14]
cmp edx, esi
jae 0x410117
mov esi, edx
test esi, esi
jbe 0x40f810
mov eax, dword [ebx + 0x18]
cmp eax, 0x10
jb 0x41012c
mov ecx, dword [ebx + 4]
jmp 0x41012f
lea ecx, [ebx + 4]
add esp, 0xfffffff0
mov dword [esp], ecx
mov dword [esp + 4], eax
add ecx, esi
mov dword [esp + 8], ecx
sub edx, esi
mov dword [esp + 0xc], edx
call fcn.0044abd5
add esp, 0x10
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x18]
sub edx, esi
mov dword [ebx + 0x14], edx
cmp eax, 0x10
jb 0x410162
mov ebx, dword [ebx + 4]
jmp 0x410165
add ebx, 4
xor eax, eax
mov byte [ebp - 0x28c], al
mov byte [ebx + edx], al
jmp 0x40f810
mov edx, dword [ebx + 0x18]
cmp edx, 0x10
jb 0x410188
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x2c4], ecx
jmp 0x410191
lea ecx, [ebx + 4]
mov dword [ebp - 0x2c4], ecx
add esp, 0xfffffff0
sub edx, esi
mov dword [esp + 4], edx
sub eax, edi
mov ebx, ecx
mov dword [esp + 0xc], eax
lea ecx, [esi + ebx]
add esi, edi
add esi, ebx
mov ebx, dword [ebp + 0xc]
mov dword [esp], ecx
mov dword [esp + 8], esi
call fcn.0044abd5
add esp, 0x10
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x18]
sub ecx, edi
mov dword [ebx + 0x14], ecx
cmp eax, 0x10
jb 0x4101d0
mov edx, dword [ebx + 4]
jmp 0x4101d3
lea edx, [ebx + 4]
xor eax, eax
mov byte [ebp - 0x290], al
mov byte [edx + ecx], al
jmp 0x410108
push dword [ebp - 0xf0]
call fcn.0042e7a2
pop ecx
jmp 0x40f6fa
push dword [ebp - 0x10c]
call fcn.0042e7a2
pop ecx
jmp 0x40f6c9
push dword [ebp - 0x128]
call fcn.0042e7a2
pop ecx
jmp 0x40f698
mov esi, dword [ebp - 0x5c]
mov ecx, dword [esi + 0x18]
cmp ecx, 0x10
jb 0x410226
mov edi, dword [esi + 4]
jmp 0x410229
lea edi, [esi + 4]
mov edx, dword [ebp - 0x58]
mov eax, dword [edx + 0x18]
cmp eax, 0x10
jb 0x410239
mov edx, dword [edx + 4]
jmp 0x41023c
add edx, 4
add edx, dword [ebp - 0x54]
mov ebx, dword [ebp - 0x64]
push ebx
push edx
push ecx
push edi
call fcn.0044a80e
add esp, 0x10
mov eax, dword [esi + 0x18]
mov dword [esi + 0x14], ebx
cmp eax, 0x10
jb 0x41025e
mov esi, dword [esi + 4]
jmp 0x410261
add esi, 4
xor eax, eax
mov byte [ebp - 0xc8], al
mov byte [esi + ebx], al
jmp 0x40f682
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x14], 0
cmp eax, 0x10
jb 0x410285
mov edx, dword [ebx + 4]
jmp 0x41028b
lea edx, [ebp - 0xb4]
xor eax, eax
mov byte [ebp - 0xd8], al
mov byte [edx], al
jmp 0x40f67a
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x160], ebx
mov edi, esi
mov dword [ebp - 0x15c], esi
or edi, 0xf
cmp edi, 0xfffffffe
mov dword [ebp - 0x158], eax
mov dword [ebp - 0x170], edi
jbe 0x4102c9
mov dword [ebp - 0x170], esi
mov edi, esi
jmp 0x4102e1
mov ebx, dword [ebx + 0x18]
mov ecx, ebx
shr ecx, 1
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
cmp ecx, edx
ja 0x410451
mov dword [ebp - 4], 0x10
mov dword [ebp - 0x16c], 0
inc edi
jne 0x4102f9
xor edi, edi
jmp 0x41033c
xor edx, edx
mov eax, 0xffffffff
div edi
cmp eax, 1
jae 0x41033c
mov dword [ebp - 0x2c0], 0
lea ebx, [ebp - 0x2e8]
mov ecx, ebx
lea eax, [ebp - 0x2c0]
push eax
call fcn.0044a5f3
mov dword [ebx], vtable.std::bad_alloc.0
lea eax, [ebp - 0x2e8]
push 0x475b08
push eax
call fcn.0044ab8b
push edi
mov dword [esp], edi
call fcn.0042e777
pop ecx
mov dword [ebp - 4], 0xf
mov dword [ebp - 0x16c], eax
mov dword [ebp - 4], 0xf
nop
mov esi, dword [ebp - 0x158]
test esi, esi
ja 0x41041e
mov edi, dword [ebp - 0x160]
mov eax, dword [edi + 0x18]
mov ebx, edi
cmp eax, 0x10
jae 0x410404
mov dword [ebx + 0x18], 0xf
mov dword [ebx + 0x14], 0
mov ecx, dword [ebp - 0x16c]
mov edx, dword [ebp - 0x170]
xor eax, eax
mov byte [ebp - 0xd0], al
mov byte [ebx + 4], al
mov byte [ebp - 0xcc], al
mov dword [edi + 4], ecx
mov dword [edi + 0x18], edx
mov dword [edi + 0x14], esi
add edi, 4
cmp edx, 0x10
jae 0x4103bb
mov ecx, edi
mov byte [ecx + esi], al
mov esi, dword [ebp - 0x74]
jmp 0x40f67a
push dword [edi + 4]
call fcn.0042e7a2
pop ecx
mov edi, dword [ebp - 0x160]
mov esi, dword [ebp - 0x158]
jmp 0x41037d
mov edi, dword [ebp - 0x160]
mov eax, dword [edi + 0x18]
cmp eax, 0x10
jb 0x410431
mov eax, dword [edi + 4]
jmp 0x410434
lea eax, [edi + 4]
mov edx, dword [ebp - 0x170]
push esi
push eax
inc edx
push edx
push dword [ebp - 0x16c]
call fcn.0044a80e
add esp, 0x10
jmp 0x41036f
mov eax, ecx
neg eax
add eax, 0xfffffffe
cmp ebx, eax
ja 0x4102e1
lea edi, [ebx + ecx]
mov dword [ebp - 0x170], edi
jmp 0x4102e1
cmp esi, dword [ebx + 0x14]
jbe 0x410478
call fcn.00461253
mov edx, dword [ebx + 0x14]
sub edx, esi
cmp edx, 0xffffffff
mov edi, edx
jb 0x410489
mov edi, 0xffffffff
test edi, edi
ja 0x4104fa
mov ebx, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x54]
mov edx, dword [ebx + 0x14]
cmp edx, esi
jae 0x41049c
mov esi, edx
test esi, esi
jbe 0x40f682
mov eax, dword [ebx + 0x18]
cmp eax, 0x10
jb 0x4104b1
mov ecx, dword [ebx + 4]
jmp 0x4104b4
lea ecx, [ebx + 4]
add esp, 0xfffffff0
mov dword [esp], ecx
mov dword [esp + 4], eax
add ecx, esi
mov dword [esp + 8], ecx
sub edx, esi
mov dword [esp + 0xc], edx
call fcn.0044abd5
add esp, 0x10
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x18]
sub edx, esi
mov dword [ebx + 0x14], edx
cmp eax, 0x10
jb 0x4104e7
mov ebx, dword [ebx + 4]
jmp 0x4104ea
add ebx, 4
xor eax, eax
mov byte [ebp - 0x294], al
mov byte [ebx + edx], al
jmp 0x40f682
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x2b8], eax
cmp eax, 0x10
jb 0x41050d
mov eax, dword [ebx + 4]
jmp 0x410513
lea eax, [ebp - 0xb4]
add esp, 0xfffffff0
lea ecx, [esi + eax]
mov dword [esp], ecx
sub edx, edi
mov ecx, dword [ebp - 0x2b8]
mov dword [esp + 0xc], edx
sub ecx, esi
add esi, edi
add esi, eax
mov dword [esp + 4], ecx
mov dword [esp + 8], esi
call fcn.0044abd5
add esp, 0x10
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x18]
sub ecx, edi
mov dword [ebx + 0x14], ecx
cmp eax, 0x10
jb 0x410553
mov edx, dword [ebx + 4]
jmp 0x410559
lea edx, [ebp - 0xb4]
xor eax, eax
mov byte [ebp - 0x298], al
mov byte [edx + ecx], al
jmp 0x41048d
mov eax, dword [ebp - 0xdc]
cmp eax, 0x10
jb 0x41057c
mov ecx, dword [ebp - 0xf0]
jmp 0x410582
lea ecx, [ebp - 0xf0]
add esp, 0xfffffff0
mov dword [esp], ecx
mov dword [esp + 4], eax
add ecx, ebx
mov dword [esp + 8], ecx
sub edx, ebx
mov dword [esp + 0xc], edx
call fcn.0044abd5
add esp, 0x10
mov edx, dword [ebp - 0xe0]
mov eax, dword [ebp - 0xdc]
sub edx, ebx
mov dword [ebp - 0xe0], edx
cmp eax, 0x10
jb 0x4105c1
mov eax, dword [ebp - 0xf0]
jmp 0x4105c7
lea eax, [ebp - 0xf0]
mov byte [eax + edx], 0
jmp 0x40f5cf
mov ecx, dword [ebp - 0xdc]
cmp ecx, 0x10
jb 0x4105e3
mov esi, dword [ebp - 0xf0]
jmp 0x4105e9
lea esi, [ebp - 0xf0]
add esp, 0xfffffff0
lea edx, [edi + esi]
mov dword [esp], edx
sub ecx, edi
add edi, ebx
mov dword [esp + 4], ecx
add edi, esi
mov dword [esp + 8], edi
sub eax, ebx
mov dword [esp + 0xc], eax
call fcn.0044abd5
add esp, 0x10
mov edx, dword [ebp - 0xe0]
mov eax, dword [ebp - 0xdc]
sub edx, ebx
mov dword [ebp - 0xe0], edx
cmp eax, 0x10
jb 0x41062f
mov eax, dword [ebp - 0xf0]
jmp 0x410635
lea eax, [ebp - 0xf0]
mov byte [eax + edx], 0
mov edx, dword [ebp - 0xe0]
jmp 0x40f5be
cmp edi, 0x10
jb 0x410651
mov eax, dword [ebp - 0xf0]
jmp 0x410657
lea eax, [ebp - 0xf0]
add eax, dword [ebp - 0xe0]
lea edx, [ebp - 0x274]
cmp eax, edx
jbe 0x40f4f2
mov eax, 1
jmp 0x40f4f4
push dword [ebp - 0xb4]
call fcn.0042e7a2
pop ecx
jmp 0x40f87d