Function at 0x49e460
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x534
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, 0x400
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x534], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x520], eax
movzx eax, word [esi + 0x24]
mov dword [ebp - 0x52c], ebx
mov dword [ebp - 0x528], 0
push edi
cmp ax, 1
je 0x49e4d4
cmp ax, 2
je 0x49e4d4
cmp ax, 4
je 0x49e4d4
cmp word [esi + 0x26], cx
je 0x49e4cd
cmp word [esi + 0x28], 0x20
je 0x49e4cd
mov edi, 3
jmp 0x49e4d9
mov edi, 4
jmp 0x49e4d9
mov edi, 1
push 0x510
lea eax, [ebp - 0x51c]
push 0
push eax
call fcn.00595760
push dword [esi + 0x2c]
lea eax, [ebp - 0x51c]
push 0x100
push eax
call fcn.0049cd40
push dword [esi + 0x30]
lea eax, [ebp - 0x51c]
push 0x101
push eax
call fcn.0049cd40
add esp, 0x24
cmp word [esi + 0x28], 8
jg 0x49e53a
movzx eax, word [ebx + 0x30]
push 0
push eax
push 1
lea eax, [ebp - 0x51c]
push 0x102
push eax
call fcn.0049cdf0
jmp 0x49e560
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0x80008
push eax
push edi
push 3
lea eax, [ebp - 0x51c]
mov dword [ebp - 8], 0x80008
push 0x102
push eax
call fcn.0049cd80
movzx eax, word [ebx + 0xe]
add esp, 0x14
push 0
push eax
push 1
lea eax, [ebp - 0x51c]
push 0x103
push eax
call fcn.0049cdf0
add esp, 0x14
cmp word [ebx + 0x30], 1
jne 0x49e5d3
movzx eax, word [ebx + 0xe]
cmp eax, 3
je 0x49e59b
cmp eax, 4
je 0x49e59b
push 0
push 1
jmp 0x49e5fe
push 0
push 0
push 1
lea eax, [ebp - 0x51c]
push 0x106
push eax
call fcn.0049cdf0
mov eax, dword [ebx + 8]
add esp, 0x14
test eax, eax
je 0x49e614
push eax
lea eax, [ebp - 0x51c]
push 0x124
push eax
call fcn.0049cd40
add esp, 0xc
jmp 0x49e614
movzx eax, word [esi + 0x24]
push 0
cmp ax, 4
jne 0x49e5e3
push 3
jmp 0x49e5fe
cmp ax, 2
jne 0x49e5ed
push 1
jmp 0x49e5fe
mov eax, 0x400
cmp word [esi + 0x26], ax
jne 0x49e5fc
push 5
jmp 0x49e5fe
push 2
push 1
lea eax, [ebp - 0x51c]
push 0x106
push eax
call fcn.0049cdf0
add esp, 0x14
mov eax, dword [ebx + 0x18]
push 0
cmp eax, 1
jne 0x49e634
lea eax, [ebp - 0x51c]
push 0x111
push eax
call fcn.0049cd40
add esp, 0xc
jmp 0x49e64b
push eax
push 4
lea eax, [ebp - 0x51c]
push 0x111
push eax
call fcn.0049cd80
add esp, 0x14
cmp edi, 1
jl 0x49e669
push 0
push edi
push 1
lea eax, [ebp - 0x51c]
push 0x115
push eax
call fcn.0049cdf0
add esp, 0x14
push dword [ebx + 0x14]
lea eax, [ebp - 0x51c]
push 0x116
push eax
call fcn.0049cd40
mov eax, dword [ebx + 0x18]
add esp, 0xc
push 0
cmp eax, 1
jne 0x49e6a0
lea eax, [ebp - 0x51c]
push 0x117
push eax
call fcn.0049cd40
add esp, 0xc
jmp 0x49e6b7
push eax
push 4
lea eax, [ebp - 0x51c]
push 0x117
push eax
call fcn.0049cd80
add esp, 0x14
movsx eax, word [esi + 0x36]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 1
push 5
lea eax, [ebp - 0x51c]
mov dword [ebp - 8], 1
push 0x11a
push eax
call fcn.0049cd80
movsx eax, word [esi + 0x38]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 1
push 5
lea eax, [ebp - 0x51c]
mov dword [ebp - 8], 1
push 0x11b
push eax
call fcn.0049cd80
push 0
push 1
push 1
lea eax, [ebp - 0x51c]
push 0x11c
push eax
call fcn.0049cdf0
push 0
push 2
push 1
lea eax, [ebp - 0x51c]
push 0x128
push eax
call fcn.0049cdf0
add esp, 0x50
lea eax, [ebp - 0x51c]
push str.LIBFORMAT__c__Pierre_e_Gougelet
push 0x20
push 2
push 0x131
push eax
call fcn.0049cd80
mov edx, dword [esi + 0x4c]
add esp, 0x14
test edx, edx
je 0x49e784
mov ecx, edx
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49e760
sub ecx, edi
push edx
lea eax, [ecx + 1]
push eax
push 2
lea eax, [ebp - 0x51c]
push 0x10e
push eax
call fcn.0049cd80
add esp, 0x14
cmp word [ebx + 0xe], 5
jne 0x49e7ae
xor eax, eax
cmp word [ebx + 0x10], ax
push 0
setne al
inc eax
push eax
push 1
lea eax, [ebp - 0x51c]
push 0x13d
push eax
call fcn.0049cdf0
add esp, 0x14
cmp word [esi + 0x24], 4
mov eax, 1
jne 0x49e7df
mov cl, byte [ebx + 0x30]
push dword [ebp - 0x520]
shl eax, cl
lea eax, [eax + eax*2]
push eax
push 3
lea eax, [ebp - 0x51c]
push 0x140
push eax
call fcn.0049cd80
add esp, 0x14
cmp word [ebx + 0xe], 7
jne 0x49e800
push 0
push 0
push 7
lea eax, [ebp - 0x51c]
push 0x15b
push eax
call fcn.0049cd80
add esp, 0x14
cmp byte [esi + 0xbd], 0
je 0x49e8a1
mov eax, dword [esi + 0x48]
test eax, eax
je 0x49e8a1
cmp dword [eax], 2
je 0x49e826
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x49e818
jmp 0x49e8a1
mov edi, dword [eax + 8]
cmp byte [edi + 0x1a], 0x1c
lea ecx, [edi + 0x1a]
jne 0x49e83a
mov edx, dword [eax + 4]
sub edx, 0x1a
jmp 0x49e873
cmp byte [edi + 0x1b], 0x1c
lea ecx, [edi + 0x1b]
jne 0x49e84b
mov edx, dword [eax + 4]
sub edx, 0x1b
jmp 0x49e873
mov ebx, dword [eax + 4]
lea eax, [ebx - 0xe]
push eax
lea eax, [edi + 0xe]
push 0x5c38b8
push eax
call fcn.0049cce0
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x49e86c
add ecx, 2
sub ebx, ecx
lea edx, [edi - 0x10]
add edx, ebx
test ecx, ecx
je 0x49e8a1
movzx edi, byte [ecx - 2]
movzx eax, byte [ecx - 1]
shl edi, 8
add edi, eax
jne 0x49e889
lea edi, [edx - 2]
push ecx
push edi
push 1
lea eax, [ebp - 0x51c]
push 0x83bb
push eax
call fcn.0049cd80
add esp, 0x14
cmp byte [esi + 0xbe], 0
je 0x49e8db
mov eax, dword [esi + 0x48]
test eax, eax
je 0x49e8db
cmp dword [eax], 3
je 0x49e8bf
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x49e8b1
jmp 0x49e8db
push dword [eax + 8]
push dword [eax + 4]
lea eax, [ebp - 0x51c]
push 1
push 0x2bc
push eax
call fcn.0049cd80
add esp, 0x14
test dword [esi + 0x54], 0x2000000
je 0x49e91a
mov eax, dword [esi + 0x48]
test eax, eax
je 0x49e91a
jmp 0x49e8f0
cmp dword [eax], 4
je 0x49e8fe
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x49e8f0
jmp 0x49e91a
push dword [eax + 8]
push dword [eax + 4]
lea eax, [ebp - 0x51c]
push 7
push 0x8773
push eax
call fcn.0049cd80
add esp, 0x14
mov eax, dword [esi + 0x48]
test eax, eax
je 0x49eb50
cmp dword [eax], 1
je 0x49e936
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x49e925
jmp 0x49eb50
push 1
push eax
mov dword [ebp - 0x524], 0
xor edi, edi
call fcn.00437250
mov ebx, eax
mov dword [ebp - 0x530], edi
add esp, 8
mov dword [ebp - 0x528], ebx
cmp dword [ebx + 4], edi
jle 0x49eb50
xor ecx, ecx
mov dword [ebp - 0x520], ecx
lea esp, [esp]
mov esi, dword [ebx]
mov edx, 0x128
add esi, ecx
mov ecx, dword [esi + 4]
cmp ecx, 1
jne 0x49ea82
movzx eax, word [esi]
cmp ax, dx
je 0x49ea82
mov edx, 0x112
cmp ax, dx
je 0x49ea82
mov edx, 0x11a
cmp ax, dx
je 0x49ea82
mov edx, 0x11b
cmp ax, dx
je 0x49ea82
mov edx, 0x100
cmp ax, dx
je 0x49ea82
mov edx, 0x101
cmp ax, dx
je 0x49ea82
mov edx, 0x102
cmp ax, dx
je 0x49ea82
mov edx, 0x103
cmp ax, dx
je 0x49ea82
mov edx, 0x106
cmp ax, dx
je 0x49ea82
mov edx, 0x111
cmp ax, dx
je 0x49ea82
mov edx, 0x115
cmp ax, dx
je 0x49ea82
mov edx, 0x116
cmp ax, dx
je 0x49ea82
mov edx, 0x117
cmp ax, dx
je 0x49ea82
mov edx, 0x131
cmp ax, dx
je 0x49ea82
mov edx, 0xc4a5
cmp ax, dx
je 0x49ea82
movzx ecx, word [esi + 2]
cmp ecx, 5
je 0x49ea6a
cmp ecx, 0xa
je 0x49ea6a
mov edx, dword [esi + 0x10]
cmp edx, 4
jle 0x49ea9f
push dword [esi + 0x14]
push edx
push ecx
push eax
lea eax, [ebp - 0x51c]
push eax
call fcn.0049cd80
add esp, 0x14
jmp 0x49ea9f
push dword [esi + 0x14]
push 1
push ecx
push eax
lea eax, [ebp - 0x51c]
push eax
call fcn.0049cd80
add esp, 0x14
jmp 0x49ea9f
cmp ecx, 2
jne 0x49ea94
mov edx, 1
mov dword [ebp - 0x524], edx
jmp 0x49eaa5
cmp ecx, 0x10
mov eax, 1
cmove edi, eax
mov edx, dword [ebp - 0x524]
mov eax, dword [ebp - 0x530]
mov ecx, dword [ebp - 0x520]
inc eax
add ecx, 0x18
mov dword [ebp - 0x530], eax
mov dword [ebp - 0x520], ecx
cmp eax, dword [ebx + 4]
jl 0x49e970
test edx, edx
je 0x49eb15
lea eax, [ebp - 0x520]
push eax
push 0
push 2
push ebx
call fcn.00453c20
push dword [ebp - 0x520]
mov esi, eax
push str.__d__n
call fcn.005927a9
push 0
push dword [ebp - 0x520]
lea eax, [ebp - 0x51c]
push 1
push 0x8769
push eax
call fcn.0049cd80
push esi
call fcn.00592c4b
add esp, 0x30
test edi, edi
je 0x49eb50
lea eax, [ebp - 0x520]
push eax
push 0
push 0x10
push ebx
call fcn.00453c20
push 0
push dword [ebp - 0x520]
mov esi, eax
lea eax, [ebp - 0x51c]
push 1
push 0x8825
push eax
call fcn.0049cd80
push esi
call fcn.00592c4b
add esp, 0x28
push dword [ebp + 0x18]
lea eax, [ebp - 0x51c]
push eax
call fcn.0049ce40
lea eax, [ebp - 0x51c]
push 0x111
push eax
call fcn.0049cfb0
mov dword [ebp - 0x520], eax
lea eax, [ebp - 0x51c]
push 0x117
push eax
call fcn.0049cfb0
mov edi, eax
lea eax, [ebp - 0x51c]
push 0x15b
push eax
call fcn.0049cfb0
mov dword [ebp - 0x530], eax
lea eax, [ebp - 0x51c]
push 0x8769
push eax
call fcn.0049cfb0
mov esi, eax
lea eax, [ebp - 0x51c]
push 0x8825
push eax
mov dword [ebp - 8], esi
call fcn.0049cfb0
mov ecx, dword [ebp - 0x52c]
mov ebx, eax
mov eax, dword [ebp - 0x520]
add esp, 0x30
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x524], ebx
test eax, eax
je 0x49ec11
cmp dword [ecx + 0x18], 1
jne 0x49ec04
lea ecx, [eax + eax*2]
mov eax, dword [ebp - 0x52c]
lea ecx, [ecx*4 + 0xa]
add ecx, edx
mov dword [eax + 0x20], ecx
mov ecx, eax
jmp 0x49ec11
lea eax, [eax + eax*4]
mov eax, dword [ebp + eax*4 - 0x514]
mov dword [ecx + 0x20], eax
test edi, edi
je 0x49ec36
cmp dword [ecx + 0x18], 1
jne 0x49ec29
lea eax, [edi + edi*2]
lea eax, [eax*4 + 0xa]
add eax, edx
jmp 0x49ec33
lea eax, [edi + edi*4]
mov eax, dword [ebp + eax*4 - 0x514]
mov dword [ecx + 0x24], eax
mov eax, dword [ebp - 0x530]
test eax, eax
je 0x49ec4f
lea eax, [eax + eax*2]
lea eax, [eax*4 + 6]
add eax, edx
mov dword [ecx + 0x2c], eax
mov ecx, 4
test esi, esi
jle 0x49ec6e
lea eax, [esi + esi*4]
mov word [ebp + eax*4 - 0x51a], cx
mov dword [ebp + eax*4 - 0x518], 1
test ebx, ebx
jle 0x49ec88
lea eax, [ebx + ebx*4]
mov word [ebp + eax*4 - 0x51a], cx
mov dword [ebp + eax*4 - 0x518], 1
mov eax, dword [ebp - 0x534]
push dword [eax]
lea eax, [ebp - 0x1c]
push 1
push 2
push eax
call fcn.0059628c
xor eax, eax
add esp, 0x10
xor edi, edi
cmp ax, word [ebp - 0x1c]
jae 0x49ed07
mov ebx, dword [ebp - 0x534]
lea esi, [ebp - 0x51a]
push dword [ebx]
lea eax, [esi - 2]
push 1
push 2
push eax
call fcn.0059628c
push dword [ebx]
push 1
push 2
push esi
call fcn.0059628c
push dword [ebx]
lea eax, [esi + 2]
push 1
push 4
push eax
call fcn.0059628c
push dword [ebx]
lea eax, [esi + 6]
push 1
push 4
push eax
call fcn.0059628c
movzx eax, word [ebp - 0x1c]
inc edi
add esp, 0x40
add esi, 0x14
cmp edi, eax
jl 0x49ecb6
mov ebx, dword [ebp - 0x524]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0x534]
push dword [edi]
call fcn.005960c7
mov ecx, dword [ebp - 0x52c]
push edi
push 0
mov dword [ecx + 0x28], eax
call fcn.0045d4e0
mov eax, dword [ebp - 0x18]
add esp, 0xc
test eax, eax
je 0x49ed3f
push dword [edi]
push 1
push dword [ebp - 0x14]
push eax
call fcn.0059628c
add esp, 0x10
push dword [edi]
call fcn.005960c7
add esp, 4
mov dword [ebp - 0x520], eax
cmp dword [ebp - 0x528], 0
je 0x49edf0
test esi, esi
jle 0x49eda6
lea ecx, [esi + esi*4]
lea esi, [ebp - 0x514]
lea esi, [esi + ecx*4]
push 0
push dword [esi]
push dword [edi]
call fcn.00595cb4
lea eax, [ebp - 8]
push eax
mov eax, dword [esi]
sub eax, 8
push eax
push 2
push dword [ebp - 0x528]
call fcn.00453c20
push dword [edi]
mov esi, eax
push 1
push dword [ebp - 8]
push esi
call fcn.0059628c
push esi
call fcn.00592c4b
add esp, 0x30
test ebx, ebx
jle 0x49edf0
lea eax, [ebx + ebx*4]
lea esi, [ebp - 0x514]
lea esi, [esi + eax*4]
push 0
push dword [esi]
push dword [edi]
call fcn.00595cb4
lea eax, [ebp - 8]
push eax
mov eax, dword [esi]
sub eax, 8
push eax
push 0x10
push dword [ebp - 0x528]
call fcn.00453c20
push dword [edi]
mov esi, eax
push 1
push dword [ebp - 8]
push esi
call fcn.0059628c
push esi
call fcn.00592c4b
add esp, 0x30
push 0
push dword [ebp - 0x520]
push dword [edi]
call fcn.00595cb4
mov eax, dword [ebp - 0x528]
add esp, 0xc
pop edi
pop esi
pop ebx
test eax, eax
je 0x49ee18
push eax
call fcn.00437370
add esp, 4
lea eax, [ebp - 0x51c]
push eax
call fcn.0049cf80
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret