Function at 0x40f1b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x4d0]
sub esp, 0x5bc
mov dword [ebp - 0x4d8], eax
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x4e8]
mov dword [ebp - 0x5b0], ecx
mov dword [ebp - 0x574], 0
mov dword [ebp - 0x570], 0
mov dword [ebp - 0x56c], 0
mov word [ebp - 0x4d0], 0x6170
mov byte [ebp - 0x4ce], 0x6b
mov dword [ebp - 0x4d4], 3
mov byte [ebp - 0x4cd], 0
mov dword [ebp - 0x590], eax
mov dword [ebp - 0x4f0], eax
test ebx, ebx
je 0x41032f
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov ebx, eax
mov dword [ebp - 0x508], eax
cmp eax, 0xf
ja 0x410208
cmp eax, 1
jne 0x40f258
mov edx, dword [ebp + 8]
mov dl, byte [edx]
mov byte [ebp - 0x4e8], dl
jmp 0x40f260
test eax, eax
jne 0x41033b
mov edx, dword [ebp - 0x590]
mov dword [ebp - 0x4ec], eax
mov byte [edx + eax], 0
lea eax, [ebp - 0x4d8]
mov dword [ebp - 0x58c], eax
mov dword [esp + 8], eax
lea eax, [ebp - 0x4f0]
mov dword [esp + 4], eax
lea eax, [ebp - 0x568]
mov dword [esp], eax
call fcn.0041fe00
mov edx, dword [ebp - 0x4f0]
mov eax, dword [ebp - 0x590]
cmp edx, eax
je 0x40f2bb
mov eax, dword [ebp - 0x4e8]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov edx, dword [ebp - 0x4d8]
lea eax, [ebp - 0x4d0]
cmp edx, eax
je 0x40f2de
mov eax, dword [ebp - 0x4d0]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov eax, dword [ebp - 0x568]
mov edx, dword [ebp - 0x564]
cmp byte [eax + edx - 1], 0x2f
je 0x410164
mov dword [esp], eax
lea eax, [ebp - 0x574]
mov dword [esp + 4], 0x488888
mov dword [ebp - 0x59c], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x594], eax
test eax, eax
je 0x410346
cmp dword [0x486158], 1
jle 0x40f347
mov eax, dword [ebp + 8]
mov dword [esp], str.Writing_file__s_n
mov dword [esp + 4], eax
lea eax, [ebp - 0x574]
mov dword [ebp - 0x59c], eax
call fcn.004719d0
mov dword [esp + 4], str.Simutrans_object_file_nCompiled_with_SimObjects_0.1.3exp_n
mov edi, dword [ebp - 0x594]
mov dword [esp], edi
call fcn.00471a00
mov dword [ebp - 0x4d8], 0x3eb
mov dword [esp + 0xc], edi
mov dword [esp + 8], 4
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x58c]
mov dword [esp], eax
lea eax, [ebp - 0x574]
mov dword [ebp - 0x59c], eax
call sub.msvcrt.dll_fwrite
lea eax, [ebp - 0x574]
mov dword [esp], edi
mov dword [ebp - 0x59c], eax
call sub.msvcrt.dll_ftell
mov dword [0x4b6064], eax
lea eax, [ebp - 0x574]
mov dword [esp], 0x14
mov dword [ebp - 0x59c], eax
call fcn.00480020
mov dword [ebp - 0x598], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov ecx, eax
mov edx, dword [ebp - 0x5b0]
mov dword [esp], edx
call fcn.0040c070
sub esp, 0xc
mov byte [ebp - 0x5b1], 0
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x5ac], 0
jg 0x4101b2
lea eax, [ebp - 0x4d0]
lea edx, [ebp - 0x574]
mov dword [ebp - 0x4d8], eax
mov eax, dword [ebp - 0x590]
mov dword [ebp - 0x4f0], eax
lea eax, [ebp - 0x4e8]
mov word [ebp - 0x4d0], 0x6164
mov byte [ebp - 0x4ce], 0x74
mov dword [ebp - 0x4d4], 3
mov byte [ebp - 0x4cd], 0
mov dword [ebp - 0x508], 2
mov dword [ebp - 0x5a4], 0x48882e
mov ebx, 2
mov dword [ebp - 0x590], eax
mov dword [ebp - 0x59c], edx
mov dword [esp + 8], ebx
mov edx, dword [ebp - 0x5a4]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov ebx, dword [ebp - 0x508]
mov eax, dword [ebp - 0x4f0]
mov dword [ebp - 0x4ec], ebx
mov byte [eax + ebx], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov eax, dword [ebp - 0x58c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x4f0]
mov dword [esp], eax
mov ecx, dword [ebp - 0x59c]
call fcn.0041fd80
mov edx, dword [ebp - 0x4f0]
mov eax, dword [ebp - 0x590]
sub esp, 0x10
cmp edx, eax
je 0x40f4f4
mov eax, dword [ebp - 0x4e8]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov edx, dword [ebp - 0x4d8]
lea eax, [ebp - 0x4d0]
cmp edx, eax
je 0x40f517
mov eax, dword [ebp - 0x4d0]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov eax, dword [ebp - 0x574]
mov edx, dword [ebp - 0x56c]
lea edx, [eax + edx*4]
mov dword [ebp - 0x5b8], edx
cmp eax, edx
je 0x40ffa6
mov dword [ebp - 0x5a0], eax
jmp 0x40f591
mov eax, dword [ebp - 0x5a0]
mov eax, dword [eax]
mov dword [esp + 8], str.Cannot_read__s
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.Write_pak
mov eax, dword [0x4b61c0]
mov dword [esp], eax
call fcn.00425600
lea ecx, [ebp - 0x57c]
call fcn.004203d0
mov ecx, dword [ebp - 0x5a0]
add ecx, 4
mov dword [ebp - 0x5a0], ecx
mov eax, dword [ebp - 0x5a0]
cmp dword [ebp - 0x5b8], eax
je 0x40ffa6
mov eax, dword [ebp - 0x5a0]
mov dword [ebp - 0x57c], 0
lea ecx, [ebp - 0x57c]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00420380
test al, al
push edi
je 0x40f53c
mov edx, dword [ebp - 0x58c]
lea ebx, [ebp - 0x1c]
mov eax, edx
mov ecx, edx
lea esi, cs:[esi]
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
add eax, 0xc
cmp eax, ebx
jne 0x40f5c8
cmp dword [0x486158], 1
mov dword [ebp - 0x58c], ecx
mov dword [ebp - 0x1c], 0
jle 0x40f611
mov eax, dword [ebp - 0x5a0]
mov eax, dword [eax]
mov dword [esp], str.___Reading_file__s_n
mov dword [esp + 4], eax
call fcn.004719d0
mov edi, dword [ebp - 0x5a4]
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov ecx, 0x4b6068
mov eax, dword [0x4b606c]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.0047bd90
sub esp, 0x10
mov ecx, 0x4b6068
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x2f
call fcn.00476660
cmp eax, 0xffffffff
push esi
push esi
je 0x40fecf
mov edx, dword [0x4b6068]
mov ecx, dword [ebp - 0x590]
mov dword [ebp - 0x5a8], edx
lea edi, [eax + 1]
mov edx, dword [0x4b606c]
mov dword [ebp - 0x4f0], ecx
cmp edx, edi
jae 0x40f68f
mov edi, edx
mov dword [ebp - 0x508], edi
cmp edi, 0xf
ja 0x40ff1f
cmp edi, 1
je 0x40ff0c
test edi, edi
jne 0x410063
mov eax, dword [ebp - 0x590]
mov dword [ebp - 0x4ec], edi
mov byte [eax + edi], 0
mov eax, dword [ebp - 0x4f0]
mov ecx, dword [ebp - 0x590]
mov edi, dword [0x4b6068]
cmp eax, ecx
je 0x4100a7
mov ecx, dword [ebp - 0x4ec]
mov edx, dword [ebp - 0x4e8]
cmp edi, 0x4b6070
je 0x40ff76
mov esi, dword [0x4b6070]
mov dword [0x4b6068], eax
mov dword [0x4b606c], ecx
mov dword [0x4b6070], edx
test edi, edi
je 0x40ff87
mov dword [ebp - 0x4f0], edi
mov dword [ebp - 0x4e8], esi
mov dword [ebp - 0x4ec], 0
mov byte [edi], 0
mov edx, dword [ebp - 0x4f0]
mov eax, dword [ebp - 0x590]
cmp edx, eax
je 0x40f74c
mov eax, dword [ebp - 0x4e8]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
cmp byte [ebp - 0x5b1], 0
je 0x40f78b
jmp 0x40f7f9
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x598]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x594]
mov dword [esp], eax
call fcn.0040c8f0
mov dword [esp], str.___
mov ecx, edi
call fcn.004216a0
push eax
mov dword [esp + 4], 0
lea ecx, [ebp - 0x57c]
mov edi, dword [ebp - 0x58c]
mov dword [esp], edi
call fcn.00422ce0
push edx
test al, al
push edx
jne 0x40f760
mov edi, dword [ebp - 0x58c]
mov ecx, edi
call fcn.00420810
mov ecx, edi
lea esi, [esi]
mov esi, dword [ebx - 0xc]
sub ebx, 0xc
mov edi, ecx
test esi, esi
je 0x40f7ea
lea esi, [esi]
mov eax, esi
mov esi, dword [esi]
mov dword [esp + 4], eax
mov dword [esp], 0x10
call fcn.0041c410
test esi, esi
jne 0x40f7d0
mov ecx, edi
cmp ebx, ecx
jne 0x40f7c0
mov dword [ebp - 0x58c], ecx
jmp 0x40f565
mov dword [esp + 4], 0
lea ecx, [ebp - 0x57c]
mov eax, dword [ebp - 0x58c]
mov dword [esp], eax
call fcn.00422ce0
push esi
test al, al
push esi
je 0x40f7ad
lea eax, [ebp - 0x548]
mov dword [ebp - 0x550], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov esi, eax
mov dword [ebp - 0x4f0], eax
cmp eax, 0xf
ja 0x40fd16
cmp eax, 1
je 0x40fd06
test eax, eax
jne 0x40ff01
lea edx, [ebp - 0x548]
mov dword [ebp - 0x54c], eax
mov byte [edx + eax], 0
mov dword [esp], str.name
mov edi, dword [ebp - 0x58c]
mov ecx, edi
call fcn.00420400
push esi
mov ecx, edi
mov dword [ebp - 0x594], eax
mov dword [esp], 0x4888e8
call fcn.00420400
push ecx
mov dword [ebp - 0x598], eax
mov edx, dword [ebp - 0x550]
mov edi, dword [ebp - 0x54c]
mov dword [ebp - 0x5a8], edx
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [ebp - 0x534], 0
mov esi, eax
lea eax, [ebp - 0x530]
mov dword [ebp - 0x538], eax
mov byte [ebp - 0x530], 0
lea eax, [edi + esi]
lea ecx, [ebp - 0x538]
mov dword [esp], eax
call fcn.0047df40
push ecx
mov eax, 0x3fffffff
mov edx, dword [ebp - 0x534]
sub eax, edx
cmp eax, edi
jb 0x410323
mov dword [esp + 4], edi
lea ecx, [ebp - 0x538]
mov eax, dword [ebp - 0x5a8]
mov dword [esp], eax
call fcn.0047e1c0
push edi
mov eax, 0x3fffffff
push edi
mov edx, dword [ebp - 0x534]
sub eax, edx
cmp eax, esi
jb 0x410317
mov dword [esp + 4], esi
lea ecx, [ebp - 0x538]
mov eax, dword [ebp - 0x598]
mov dword [esp], eax
call fcn.0047e1c0
push ecx
push ecx
cmp dword [ebp - 0x534], 0x3fffffff
je 0x41030b
mov dword [esp + 4], 1
mov dword [esp], 0x488901
lea ecx, [ebp - 0x538]
call fcn.0047e1c0
push edx
push edx
lea edx, [ebp - 0x518]
mov dword [ebp - 0x520], edx
lea edx, [eax + 8]
mov edi, edx
mov ecx, dword [eax]
mov dword [ebp - 0x598], edx
cmp ecx, edi
mov edx, dword [eax + 4]
je 0x40fd99
mov dword [ebp - 0x520], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x518], ecx
mov dword [ebp - 0x51c], edx
mov edx, dword [ebp - 0x598]
mov dword [eax], edx
mov dword [eax + 4], 0
mov byte [eax + 8], 0
mov eax, dword [ebp - 0x594]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov edx, 0x3fffffff
mov edi, dword [ebp - 0x51c]
sub edx, edi
cmp edx, eax
jb 0x4102f3
lea ecx, [ebp - 0x520]
mov dword [ebp - 0x598], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x594]
mov dword [esp], eax
call fcn.0047e1c0
lea edx, [ebp - 0x500]
push esi
push esi
mov dword [ebp - 0x508], edx
mov ecx, dword [eax]
lea edx, [eax + 8]
mov dword [ebp - 0x594], edx
mov esi, dword [eax + 4]
cmp ecx, edx
je 0x40fe80
mov dword [ebp - 0x508], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x500], ecx
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x594]
mov dword [ebp - 0x504], ecx
mov dword [eax + 4], 0
mov byte [eax + 8], 0
mov dword [eax], edx
mov ecx, dword [ebp - 0x504]
mov eax, 0x3fffffff
sub eax, ecx
cmp eax, 3
jbe 0x4102e1
lea esi, [ebp - 0x508]
mov dword [esp + 4], 4
mov dword [esp], str..pak
mov ecx, esi
call fcn.0047e1c0
push edx
push edx
mov edx, dword [ebp - 0x590]
mov esi, dword [eax + 4]
mov dword [ebp - 0x4f0], edx
lea edx, [eax + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x594], edx
cmp ecx, edx
je 0x40fe31
mov dword [ebp - 0x4f0], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x4e8], ecx
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x594]
mov dword [ebp - 0x4ec], ecx
mov dword [eax], edx
mov byte [eax + 8], 0
mov ecx, dword [ebp - 0x590]
mov edx, dword [ebp - 0x4f0]
mov dword [eax + 4], 0
cmp edx, ecx
mov eax, dword [ebp - 0x550]
je 0x40fdd3
lea edi, [ebp - 0x548]
mov esi, dword [ebp - 0x4ec]
mov ecx, dword [ebp - 0x4e8]
cmp eax, edi
je 0x40fd6a
mov edi, dword [ebp - 0x548]
mov dword [ebp - 0x550], edx
mov dword [ebp - 0x54c], esi
mov dword [ebp - 0x548], ecx
test eax, eax
je 0x40fd7c
mov dword [ebp - 0x4f0], eax
mov dword [ebp - 0x4e8], edi
mov dword [ebp - 0x4ec], 0
mov byte [eax], 0
mov eax, dword [ebp - 0x4f0]
mov edx, dword [ebp - 0x590]
cmp eax, edx
je 0x40fb56
mov edx, dword [ebp - 0x4e8]
mov dword [esp], eax
inc edx
mov dword [esp + 4], edx
call fcn.00480000
mov eax, dword [ebp - 0x508]
lea edx, [ebp - 0x500]
cmp eax, edx
je 0x40fb79
mov edx, dword [ebp - 0x500]
mov dword [esp], eax
inc edx
mov dword [esp + 4], edx
call fcn.00480000
mov eax, dword [ebp - 0x520]
lea edx, [ebp - 0x518]
cmp eax, edx
je 0x40fb9c
mov edx, dword [ebp - 0x518]
mov dword [esp], eax
inc edx
mov dword [esp + 4], edx
call fcn.00480000
mov eax, dword [ebp - 0x538]
lea edx, [ebp - 0x530]
cmp eax, edx
je 0x40fbbf
mov edx, dword [ebp - 0x530]
mov dword [esp], eax
inc edx
mov dword [esp + 4], edx
call fcn.00480000
mov dword [esp + 4], 0x488888
mov eax, dword [ebp - 0x550]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x594], eax
test eax, eax
je 0x4102bd
cmp dword [0x486158], 1
jle 0x40fc02
mov eax, dword [ebp - 0x550]
mov dword [esp], str.___Writing_file__s_n
mov dword [esp + 4], eax
call fcn.004719d0
mov dword [esp + 4], str.Simutrans_object_file_nCompiled_with_SimObjects_0.1.3exp_n
mov edi, dword [ebp - 0x594]
mov dword [esp], edi
call fcn.00471a00
lea eax, [ebp - 0x4f0]
mov dword [ebp - 0x4f0], 0x3eb
mov dword [esp + 0xc], edi
mov dword [esp + 8], 4
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], edi
call sub.msvcrt.dll_ftell
mov dword [0x4b6064], eax
mov dword [esp], 0x14
call fcn.00480020
mov dword [ebp - 0x598], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov ecx, eax
mov edx, dword [ebp - 0x5b0]
mov dword [esp], edx
call fcn.0040c070
mov eax, dword [ebp - 0x550]
lea edx, [ebp - 0x548]
sub esp, 0xc
cmp eax, edx
je 0x40fca9
mov edx, dword [ebp - 0x548]
mov dword [esp], eax
inc edx
mov dword [esp + 4], edx
call fcn.00480000
mov eax, dword [ebp - 0x58c]
mov dword [esp + 8], eax
mov edi, dword [ebp - 0x598]
mov dword [esp + 4], edi
mov esi, dword [ebp - 0x594]
mov dword [esp], esi
call fcn.0040c8f0
mov dword [esp], str.___
mov ecx, dword [ebp - 0x58c]
call fcn.004216a0
push eax
mov ecx, edi
mov dword [esp], esi
call fcn.0040c1d0
push eax
mov dword [esp + 4], 0x14
mov dword [esp], edi
call fcn.00480000
mov dword [esp], esi
call sub.msvcrt.dll_fclose
jmp 0x40f7f9
mov edx, dword [ebp + 8]
mov dl, byte [edx]
mov byte [ebp - 0x548], dl
jmp 0x40f854
lea eax, [ebp - 0x4f0]
mov dword [esp + 4], 0
mov dword [esp], eax
lea ecx, [ebp - 0x550]
call fcn.0047e350
push edi
push edi
mov dword [ebp - 0x550], eax
mov edx, dword [ebp - 0x4f0]
mov dword [ebp - 0x548], edx
mov dword [esp + 8], esi
mov ecx, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x4f0]
mov edx, dword [ebp - 0x550]
jmp 0x40f85a
mov dword [ebp - 0x550], edx
mov dword [ebp - 0x54c], esi
mov dword [ebp - 0x548], ecx
mov eax, dword [ebp - 0x590]
mov dword [ebp - 0x4f0], eax
lea eax, [ebp - 0x4e8]
mov dword [ebp - 0x590], eax
jmp 0x40fb26
inc edx
mov esi, edi
cmp edx, 4
lea edi, [ebp - 0x518]
jb 0x40fdae
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
test dl, 2
je 0x40fdc0
mov cx, word [esi]
mov word [edi], cx
mov ecx, 2
and edx, 1
je 0x40fdcb
mov dl, byte [esi + ecx]
mov byte [edi + ecx], dl
mov edx, dword [eax + 4]
jmp 0x40f99c
mov edx, dword [ebp - 0x4ec]
test edx, edx
je 0x40fe1c
cmp edx, 1
je 0x41008e
mov esi, ecx
mov edi, eax
cmp edx, 4
jae 0x41006e
xor eax, eax
test dl, 2
je 0x40fe05
mov ax, word [esi]
mov word [edi], ax
mov eax, 2
and edx, 1
je 0x40fe10
mov dl, byte [esi + eax]
mov byte [edi + eax], dl
mov edx, dword [ebp - 0x4ec]
mov eax, dword [ebp - 0x550]
mov dword [ebp - 0x54c], edx
mov byte [eax + edx], 0
mov eax, dword [ebp - 0x4f0]
jmp 0x40fb26
lea edx, [esi + 1]
mov edi, dword [ebp - 0x590]
mov dword [ebp - 0x598], edx
mov esi, dword [ebp - 0x594]
cmp edx, 4
jb 0x40fe52
shr edx, 2
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
test byte [ebp - 0x598], 2
je 0x40fe68
mov cx, word [esi]
mov word [edi], cx
mov ecx, 2
test byte [ebp - 0x598], 1
je 0x40faaa
mov dl, byte [esi + ecx]
mov byte [edi + ecx], dl
jmp 0x40faaa
lea edx, [esi + 1]
lea edi, [ebp - 0x500]
mov dword [ebp - 0x5a8], edx
mov esi, dword [ebp - 0x594]
cmp edx, 4
jb 0x40fea1
shr edx, 2
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
test byte [ebp - 0x5a8], 2
je 0x40feb7
mov cx, word [esi]
mov word [edi], cx
mov ecx, 2
test byte [ebp - 0x5a8], 1
je 0x40fa29
mov dl, byte [esi + ecx]
mov byte [edi + ecx], dl
jmp 0x40fa29
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4888e2
mov eax, dword [0x4b606c]
mov ecx, 0x4b6068
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.0047bd90
sub esp, 0x10
jmp 0x40f74c
lea eax, [ebp - 0x548]
jmp 0x40fd46
mov eax, dword [ebp - 0x5a8]
mov al, byte [eax]
mov byte [ebp - 0x4e8], al
jmp 0x40f6af
lea esi, [ebp - 0x508]
mov dword [esp + 4], 0
mov dword [esp], esi
lea ecx, [ebp - 0x4f0]
call fcn.0047e350
push ecx
push ecx
mov dword [ebp - 0x4f0], eax
mov edx, dword [ebp - 0x508]
mov dword [ebp - 0x4e8], edx
mov dword [esp + 8], edi
mov edx, dword [ebp - 0x5a8]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edi, dword [ebp - 0x508]
mov eax, dword [ebp - 0x4f0]
jmp 0x40f6b5
mov dword [0x4b6068], eax
mov dword [0x4b606c], ecx
mov dword [0x4b6070], edx
mov eax, dword [ebp - 0x590]
mov dword [ebp - 0x4f0], eax
lea eax, [ebp - 0x4e8]
mov dword [ebp - 0x590], eax
mov edi, eax
jmp 0x40f71c
mov edx, dword [ebp - 0x5ac]
inc edx
mov dword [ebp - 0x5ac], edx
mov eax, dword [ebp - 0x5ac]
cmp dword [ebp + 0xc], eax
jle 0x4101c3
mov edx, dword [ebp - 0x5ac]
mov eax, dword [ebp + 0x10]
mov word [ebp - 0x4d0], 0x6164
mov byte [ebp - 0x4ce], 0x74
mov eax, dword [eax + edx*4]
lea edx, [ebp - 0x4d0]
mov dword [ebp - 0x4d8], edx
mov edx, dword [ebp - 0x590]
mov dword [ebp - 0x5a4], eax
mov dword [ebp - 0x4d4], 3
mov byte [ebp - 0x4cd], 0
mov dword [ebp - 0x4f0], edx
test eax, eax
je 0x410376
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov ebx, eax
mov dword [ebp - 0x508], eax
cmp eax, 0xf
jbe 0x4100fc
lea esi, [ebp - 0x508]
mov dword [esp + 4], 0
mov dword [esp], esi
lea ecx, [ebp - 0x4f0]
call fcn.0047e350
push edx
push edx
mov dword [ebp - 0x4f0], eax
mov edx, dword [ebp - 0x508]
mov dword [ebp - 0x4e8], edx
jmp 0x40f474
mov eax, dword [ebp - 0x590]
jmp 0x40ff4f
test al, 1
jne 0x4102a5
test edi, 2
jne 0x410290
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x40fdf3
mov dl, byte [ebp - 0x4e8]
mov byte [eax], dl
mov edx, dword [ebp - 0x4ec]
mov eax, dword [ebp - 0x550]
jmp 0x40fe1c
mov eax, dword [ebp - 0x4ec]
test eax, eax
je 0x4100e8
cmp eax, 1
je 0x41014e
mov esi, ecx
cmp eax, 4
jae 0x41012a
xor edx, edx
test al, 2
je 0x4100d2
mov dx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x4100dc
mov al, byte [esi + edx]
mov byte [edi + edx], al
mov eax, dword [ebp - 0x4ec]
mov edi, dword [0x4b6068]
mov dword [0x4b606c], eax
mov byte [edi + eax], 0
mov edi, dword [ebp - 0x4f0]
jmp 0x40f71c
cmp eax, 1
je 0x410114
test eax, eax
jne 0x410382
mov eax, dword [ebp - 0x590]
jmp 0x40f496
mov eax, dword [ebp - 0x5a4]
mov al, byte [eax]
mov byte [ebp - 0x5a0], al
mov byte [ebp - 0x4e8], al
jmp 0x410109
test edi, 1
jne 0x410390
test edi, 2
jne 0x4103a8
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x4100c1
mov al, byte [ebp - 0x4e8]
mov byte [edi], al
mov eax, dword [ebp - 0x4ec]
mov edi, dword [0x4b6068]
jmp 0x4100e8
mov eax, dword [ebp + 8]
mov dword [esp], str.writing_individual_files_to__s_n
mov dword [esp + 4], eax
lea eax, [ebp - 0x574]
mov dword [ebp - 0x59c], eax
call fcn.004719d0
cmp dword [ebp + 0xc], 0
mov byte [ebp - 0x5b1], 1
mov dword [ebp - 0x598], 0
mov dword [ebp - 0x594], 0
mov dword [ebp - 0x5ac], 0
jle 0x40f40a
lea eax, [ebp - 0x574]
mov dword [ebp - 0x59c], eax
jmp 0x40ffc2
cmp byte [ebp - 0x5b1], 0
je 0x41025c
mov edx, dword [ebp - 0x568]
lea eax, [ebp - 0x560]
cmp edx, eax
je 0x4101f3
mov eax, dword [ebp - 0x560]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov ecx, dword [ebp - 0x59c]
call fcn.004201a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
lea esi, [ebp - 0x508]
mov dword [esp + 4], 0
mov dword [esp], esi
lea ecx, [ebp - 0x4f0]
call fcn.0047e350
push ecx
push ecx
mov dword [ebp - 0x4f0], eax
mov edx, dword [ebp - 0x508]
mov dword [ebp - 0x4e8], edx
mov dword [esp + 8], ebx
mov edx, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x508]
mov edx, dword [ebp - 0x4f0]
jmp 0x40f266
mov edi, dword [ebp - 0x594]
mov dword [esp], edi
mov ebx, dword [ebp - 0x598]
mov ecx, ebx
call fcn.0040c1d0
push eax
mov dword [esp + 4], 0x14
mov dword [esp], ebx
call fcn.00480000
mov dword [esp], edi
call sub.msvcrt.dll_fclose
jmp 0x4101d0
mov ax, word [esi]
add edi, 2
mov word [edi - 2], ax
add esi, 2
sub edx, 2
jmp 0x410082
mov al, byte [ecx]
inc edi
mov byte [ebp - 0x594], al
lea esi, [ebp - 0x4e7]
mov byte [edi - 1], al
dec edx
jmp 0x410076
mov eax, dword [ebp + 8]
mov dword [esp + 8], str.Cannot_create_destination_file__s
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.Write_pak
mov eax, dword [0x4b61c0]
mov dword [esp], eax
call fcn.00425880
mov dword [esp], 0x4888ec
lea esi, [ebp - 0x508]
call fcn.004832e4
lea eax, [ebp - 0x520]
mov dword [esp], 0x4888ec
mov dword [ebp - 0x598], eax
call fcn.004832e4
mov dword [esp], 0x4888ec
call fcn.004832e4
mov dword [esp], 0x4888ec
call fcn.004832e4
mov dword [esp], 0x4888ec
call fcn.004832e4
mov dword [esp], 0x488834
call fcn.004831f4
mov eax, dword [ebp - 0x590]
jmp 0x410238
mov eax, dword [ebp + 8]
mov dword [esp + 8], str.Cannot_create_destination_file__s
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.Write_pak
mov eax, dword [0x4b61c0]
mov dword [esp], eax
lea eax, [ebp - 0x574]
mov dword [ebp - 0x59c], eax
call fcn.00425880
mov dword [esp], 0x488834
call fcn.004831f4
mov eax, dword [ebp - 0x590]
jmp 0x40f474
mov dl, byte [ecx]
inc edi
mov byte [ebp - 0x5a8], dl
lea esi, [ebp - 0x4e7]
mov byte [edi - 1], dl
dec eax
jmp 0x410136
mov dx, word [esi]
add edi, 2
mov word [edi - 2], dx
add esi, 2
sub eax, 2
jmp 0x410142