Function at 0x100029e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp byte [ebx + 0x12828], 0
push esi
jne 0x10002a4c
mov eax, dword [ebx + 4]
push 2
push 0
push eax
call fcn.10005b48
mov ecx, dword [ebx + 4]
push ecx
lea esi, [ebx + 0xc]
call fcn.10005d58
mov edx, dword [ebx + 8]
push edx
push 1
push 4
push esi
mov dword [esi], eax
call fcn.10005f14
add esp, 0x20
cmp eax, 1
jae 0x10002a2b
mov eax, str.Write_Error
call fcn.10001cf0
add dword [ebx + 0x10], 4
cmp dword [esi], 0
je 0x10002e5c
mov eax, dword [ebx + 4]
push eax
call fcn.10005f8e
add esp, 4
mov dword [esi], 0
jmp 0x10002aa2
mov ecx, dword [ebx + 0x1284c]
lea eax, [ebx + 0x1282c]
mov dword [ebx + 0xc], ecx
call fcn.10003220
mov eax, dword [ebx + 0x12840]
test eax, eax
je 0x10002a78
mov edx, dword [ebx + 0xc]
mov dword [eax], edx
add dword [ebx + 0x12844], 4
jmp 0x10002a83
mov eax, dword [ebx + 0x1282c]
mov ecx, dword [ebx + 0xc]
mov dword [eax], ecx
add dword [ebx + 0x10], 4
cmp dword [ebx + 0xc], 0
je 0x10002e5c
mov dword [ebx + 0x12850], 0
mov dword [ebx + 0xc], 0
push edi
mov edx, ebx
call fcn.10002110
mov eax, 0x1000
lea edi, [ebx + 0x9064]
mov ecx, 0x100
rep stosd dword es:[edi], eax
mov ecx, eax
lea edi, [ebx + 0x9464]
rep stosd dword es:[edi], eax
push 0xfc4
lea eax, [ebx + 0x18]
push 0x20
push eax
xor edi, edi
mov dword [ebp - 8], 0xfc4
call fcn.10006d10
add esp, 0xc
cmp byte [ebx + 0x12828], 0
jne 0x10002b7e
xor esi, esi
mov edx, dword [ebx + 4]
push edx
call fcn.100059ca
add esp, 4
cmp eax, 0xffffffff
je 0x10002b0f
mov byte [esi + ebx + 0xfdc], al
inc esi
cmp esi, 0x3c
jl 0x10002af1
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
mov dword [ebx + 0xc], eax
mov esi, 0xfc3
lea ecx, [ecx]
mov eax, ebx
call fcn.10001e90
dec esi
cmp esi, 0xf88
jge 0x10002b20
mov esi, 0xfc4
call fcn.10001e90
lea ebx, [ebx]
mov eax, dword [ebp - 4]
cmp dword [ebx + 0x1058], eax
jle 0x10002b51
mov dword [ebx + 0x1058], eax
mov eax, dword [ebx + 0x1058]
cmp eax, 2
jg 0x10002cbd
mov ecx, dword [ebp - 8]
mov dword [ebx + 0x1058], 1
movzx eax, byte [ebx + ecx + 0x18]
mov ecx, ebx
call fcn.10002360
jmp 0x10002cd8
mov dword [ebp - 4], edi
mov eax, dword [ebx + 0x12850]
cmp eax, dword [ebx + 0x1284c]
jge 0x10002b12
mov ecx, dword [ebx + 0x12848]
movzx ecx, byte [eax + ecx]
inc eax
mov dword [ebx + 0x12850], eax
mov eax, dword [ebp - 4]
mov byte [ebx + eax + 0xfdc], cl
mov esi, dword [ebx + 0x12850]
cmp esi, dword [ebx + 0x1284c]
jge 0x10002c88
mov edx, dword [ebx + 0x12848]
movzx ecx, byte [esi + edx]
inc esi
mov dword [ebx + 0x12850], esi
mov byte [ebx + eax + 0xfdd], cl
mov esi, dword [ebx + 0x12850]
cmp esi, dword [ebx + 0x1284c]
jge 0x10002c91
mov ecx, dword [ebx + 0x12848]
movzx ecx, byte [esi + ecx]
inc esi
mov dword [ebx + 0x12850], esi
mov byte [ebx + eax + 0xfde], cl
mov esi, dword [ebx + 0x12850]
cmp esi, dword [ebx + 0x1284c]
jge 0x10002c9c
mov edx, dword [ebx + 0x12848]
movzx ecx, byte [esi + edx]
inc esi
mov dword [ebx + 0x12850], esi
mov byte [ebx + eax + 0xfdf], cl
mov esi, dword [ebx + 0x12850]
cmp esi, dword [ebx + 0x1284c]
jge 0x10002ca7
mov ecx, dword [ebx + 0x12848]
movzx ecx, byte [esi + ecx]
inc esi
mov dword [ebx + 0x12850], esi
mov byte [ebx + eax + 0xfe0], cl
mov esi, dword [ebx + 0x12850]
cmp esi, dword [ebx + 0x1284c]
jge 0x10002cb2
mov edx, dword [ebx + 0x12848]
movzx ecx, byte [esi + edx]
inc esi
mov dword [ebx + 0x12850], esi
mov byte [ebx + eax + 0xfe1], cl
add eax, 6
mov dword [ebp - 4], eax
cmp eax, 0x3c
jl 0x10002b81
jmp 0x10002b12
inc eax
mov dword [ebp - 4], eax
jmp 0x10002b12
add eax, 2
mov dword [ebp - 4], eax
jmp 0x10002b12
add eax, 3
mov dword [ebp - 4], eax
jmp 0x10002b12
add eax, 4
mov dword [ebp - 4], eax
jmp 0x10002b12
add eax, 5
mov dword [ebp - 4], eax
jmp 0x10002b12
add eax, 0xfd
mov ecx, ebx
call fcn.10002360
mov edx, dword [ebx + 0x1054]
dec edx
push edx
mov eax, ebx
call fcn.10002460
cmp byte [ebx + 0x12828], 0
mov eax, dword [ebx + 0x1058]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
jne 0x10002d5d
test eax, eax
jle 0x10002dc6
lea esp, [esp]
mov eax, dword [ebx + 4]
push eax
call fcn.100059ca
add esp, 4
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x10002dc6
mov edx, edi
mov eax, ebx
call fcn.10002010
mov al, byte [ebp - 0x10]
mov byte [ebx + edi + 0x18], al
cmp edi, 0x3b
jge 0x10002d34
mov byte [edi + ebx + 0x1018], al
mov esi, dword [ebp - 8]
inc esi
and esi, 0xfff
inc edi
mov eax, ebx
and edi, 0xfff
mov dword [ebp - 8], esi
call fcn.10001e90
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x14]
jl 0x10002d00
jmp 0x10002dc6
test eax, eax
jle 0x10002dc6
mov eax, dword [ebx + 0x12850]
cmp eax, dword [ebx + 0x1284c]
jge 0x10002dc6
mov edx, dword [ebx + 0x12848]
movzx ecx, byte [edx + eax]
inc eax
mov dword [ebx + 0x12850], eax
mov edx, edi
mov eax, ebx
mov dword [ebp - 0x10], ecx
call fcn.10002010
mov al, byte [ebp - 0x10]
mov byte [ebx + edi + 0x18], al
cmp edi, 0x3b
jge 0x10002d9f
mov byte [edi + ebx + 0x1018], al
mov esi, dword [ebp - 8]
inc esi
and esi, 0xfff
inc edi
mov eax, ebx
and edi, 0xfff
mov dword [ebp - 8], esi
call fcn.10001e90
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x14]
jl 0x10002d61
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0x14]
add dword [ebx + 0xc], edx
cmp dword [ebx + 0xc], eax
jbe 0x10002ddc
add eax, 0x400
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 0x14]
cmp edx, eax
jge 0x10002e1c
sub eax, edx
mov dword [ebp - 0x14], eax
jmp 0x10002df0
mov edx, edi
mov eax, ebx
call fcn.10002010
mov esi, dword [ebp - 8]
inc edi
inc esi
and esi, 0xfff
and edi, 0xfff
dec dword [ebp - 4]
mov dword [ebp - 8], esi
je 0x10002e17
call fcn.10001e90
dec dword [ebp - 0x14]
jne 0x10002df0
cmp dword [ebp - 4], 0
jg 0x10002b40
inc dword [ebx + 0xd474]
cmp dword [ebx + 0xd468], 0x8000
pop edi
mov eax, ebx
jae 0x10002e4e
push 0
call fcn.10002280
mov esi, ebx
call fcn.10001de0
pop esi
mov esp, ebp
pop ebp
ret
push 1
call fcn.10002280
mov esi, ebx
call fcn.10001de0
pop esi
mov esp, ebp
pop ebp
ret