Function at 0x491550
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov esi, eax
test eax, eax
mov edi, dword [esp + 0x70]
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x44], edi
je 0x491c7a
mov edx, dword [eax + 8]
test edx, edx
je 0x491c7a
mov eax, dword [eax]
test eax, eax
jne 0x4915b0
mov ebx, dword [edx + 0x28]
test ebx, ebx
je 0x4915b8
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x28]
add esp, 0x5c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00490360
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
cmp eax, 2
sete al
and eax, 0xff
nop
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x28]
test edx, edx
je 0x491c21
mov ecx, dword [esi + 0x34]
test ecx, ecx
jle 0x4915f2
mov edx, dword [esp + 0x28]
mov eax, esi
mov ecx, dword [esp + 0x34]
call fcn.004904f0
mov edx, dword [esi + 0x38]
mov eax, dword [esi + 0x44]
lea eax, [eax + edx*8]
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], edx
mov eax, dword [esi]
mov dword [esp + 0x3c], 0
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0x30], 1
add ecx, 0x40
mov ebp, esi
mov dword [esp + 0x4c], ecx
test eax, eax
jne 0x4915b0
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x491788
mov ebx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x18]
mov ecx, dword [ebx + 0x14]
mov dword [ebp + 0x1c], 0
mov esi, edi
cmp edi, ecx
jge 0x4918b0
mov al, byte [esp + 0x3c]
mov dword [esp + 0x2c], edi
and eax, 1
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x43], al
mov eax, dword [ebx + 0x18]
lea edx, [esi + esi*4]
lea edx, [eax + edx*4]
mov dword [esp + 0x24], edx
mov ecx, dword [edx + 4]
test ecx, ecx
js 0x491a02
mov edi, dword [edx]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x38], edi
cmp edx, 0x123457
je 0x491a22
cmp edx, 0x123456
je 0x491af0
test edx, edx
js 0x491844
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ecx + 0x18]
mov eax, dword [eax + edx*4]
lea edx, [ecx + edx*8]
cmp eax, dword [edx]
jl 0x491a02
cmp eax, dword [edx + 4]
jg 0x491a02
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4916c2
mov edi, dword [esp + 0x34]
test edi, edi
jne 0x491b70
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
inc eax
cmp dword [edx + 0x14], eax
jle 0x4916e0
mov ebx, dword [ebp + 0x34]
test ebx, ebx
jle 0x491c0d
mov eax, ebp
call fcn.004905d0
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 8]
test eax, eax
js 0x4916f5
mov edx, dword [ebp + 0x2c]
mov ecx, dword [edx + eax*4]
inc ecx
mov dword [edx + eax*4], ecx
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0xc]
cmp eax, 0x123455
ja 0x49170d
mov edx, dword [ebp + 0x2c]
mov dword [edx + eax*4], 0
mov eax, dword [ebp + 8]
mov edi, dword [esp + 0x24]
mov eax, dword [eax + 8]
mov edx, dword [edi + 4]
mov eax, dword [eax + edx*4]
test eax, eax
je 0x49172a
cmp dword [eax], 4
je 0x491ba3
mov edi, dword [esp + 0x24]
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], 0
mov eax, dword [edi]
test eax, eax
je 0x491769
mov edx, dword [ebp + 0x44]
test edx, edx
je 0x491b50
mov eax, dword [ebp + 0x38]
inc eax
mov dword [ebp + 0x38], eax
cmp eax, dword [ebp + 0x34]
jge 0x491b50
lea eax, [edx + eax*8]
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], eax
mov eax, dword [ebp]
mov dword [esp + 0x30], 1
test eax, eax
jne 0x4915b0
mov ebx, dword [esp + 0x28]
test ebx, ebx
jne 0x491621
cmp dword [esp + 0x3c], 1
jne 0x49159f
mov ebx, dword [ebp + 0x14]
cmp dword [ebx], 2
je 0x491c70
mov eax, dword [ebp + 0x2c]
test eax, eax
jne 0x491624
lea esi, [esi]
mov esi, dword [esp + 0x30]
test esi, esi
je 0x491810
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x491810
cmp dword [eax], 4
je 0x491810
mov eax, dword [ebp + 0x50]
test eax, eax
je 0x4917d4
mov dword [esp], eax
call dword [0x6713e0]
mov edx, dword [esp + 0x28]
mov dword [esp], edx
call fcn.004452f0
mov edx, dword [ebp + 8]
mov dword [ebp + 0x50], eax
mov ecx, dword [edx + 0x14]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x2c]
shl ecx, 2
mov dword [ebp + 0x4c], eax
mov eax, dword [ebp + 0x54]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov dword [esp + 0x30], 0
mov eax, ebp
mov dword [ebp + 4], 0
call fcn.004914b0
mov eax, dword [ebp]
test eax, eax
jne 0x4915b0
mov edx, dword [ebp + 0x38]
mov eax, dword [ebp + 0x44]
lea eax, [eax + edx*8]
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], eax
jmp 0x491615
mov eax, dword [esp + 0x38]
test eax, eax
je 0x491c3d
mov edi, dword [esp + 0x28]
test edi, edi
je 0x491a02
mov edi, dword [esp + 0x38]
mov edx, dword [esp + 0x28]
mov eax, dword [edi + 0x14]
mov dword [esp + 0x20], ecx
call fcn.0048e320
mov ecx, dword [edi + 0x1c]
test ecx, ecx
mov ecx, dword [esp + 0x20]
je 0x491891
mov edx, dword [esp + 0x44]
test edx, edx
je 0x491a02
test eax, eax
sete al
and eax, 0xff
cmp eax, 1
je 0x4918ce
test eax, eax
jns 0x491a02
mov edi, dword [esp + 0x2c]
mov dword [ebp], 0xfffffffc
mov esi, edi
nop
lea esi, [esi]
test esi, esi
jne 0x4917b0
mov eax, dword [ebp + 0x14]
mov edi, dword [eax + 0x14]
test edi, edi
je 0x4917b0
mov eax, dword [ebp]
jmp 0x491611
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 8]
test eax, eax
js 0x4918ef
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x18]
mov edi, dword [edx + eax*8 + 4]
mov edx, dword [ebp + 0x2c]
cmp dword [edx + eax*4], edi
jge 0x491a02
mov edi, dword [esp + 0x38]
mov ebx, dword [edi + 0xc]
test ebx, ebx
jle 0x4916af
mov edi, dword [esp + 0x38]
mov eax, dword [edi + 0x10]
test eax, eax
jle 0x4916af
mov edx, dword [ebp + 8]
inc esi
cmp dword [esp + 0x1c], esi
mov edx, dword [edx + 8]
mov edx, dword [edx + ecx*4]
mov dword [esp + 0x2c], edx
jle 0x49193d
mov eax, dword [ebp + 0x34]
test eax, eax
jle 0x491cba
mov eax, ebp
call fcn.004905d0
mov esi, dword [esp + 0x38]
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0xc]
mov dword [ebp + 0x1c], 1
mov edx, 1
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
jmp 0x491959
mov eax, dword [edi + 0x10]
mov ebx, dword [edi + 0xc]
cmp eax, edx
je 0x491cb4
mov ecx, dword [ebp + 0x38]
mov esi, dword [ebp + 0x44]
lea eax, [ecx + 1]
mov dword [ebp + 0x38], eax
lea eax, [esi + eax*8]
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x34], eax
test esi, esi
je 0x491c9e
cmp ebx, edx
jg 0x4919b9
mov eax, dword [ebp + 0x14]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x34]
mov ebx, dword [ebp + 0x18]
mov dword [ebp + 0x14], edx
mov dword [ebp + 0x18], 0xffffffff
test eax, eax
jle 0x491c82
mov eax, ebp
call fcn.004905d0
mov ecx, dword [esp + 0x28]
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x14], ecx
mov eax, dword [edi + 0x14]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00445450
mov edx, dword [ebp + 0x1c]
inc edx
cmp eax, 1
mov dword [ebp + 0x1c], edx
je 0x491953
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x38]
cmp edx, dword [esi + 0xc]
jl 0x4917b0
cmp eax, 0
jl 0x4917b0
je 0x4917b0
mov esi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x14]
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x2c]
mov ecx, dword [ebx + 0x14]
inc esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], esi
mov dword [ebp + 0x18], esi
cmp ecx, esi
jg 0x49164e
jmp 0x4918b0
mov edi, dword [esp + 0x28]
test edi, edi
jne 0x491a35
cmp byte [esp + 0x43], 0
jne 0x491b42
mov esi, dword [esp + 0x28]
test esi, esi
je 0x491a02
mov ecx, dword [ebx + 0x14]
test ecx, ecx
jle 0x491a02
mov ecx, ebx
xor esi, esi
mov ebx, ebp
lea esi, [esi]
mov eax, dword [ecx + 0x18]
lea edi, [esi + esi*4]
lea edi, [eax + edi*4]
mov eax, dword [edi + 8]
test eax, eax
js 0x491ad3
cmp dword [esp + 0x24], edi
je 0x491ad3
mov ecx, dword [ebx + 8]
mov ecx, dword [ecx + 0x18]
lea ebp, [ecx + eax*8]
mov ecx, dword [ebx + 0x2c]
mov ecx, dword [ecx + eax*4]
cmp ecx, dword [ebp + 4]
jge 0x491aa3
mov eax, dword [edi]
test eax, eax
je 0x491aa3
mov eax, dword [eax + 0x14]
mov edx, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], edx
mov dword [esp + 0x20], ecx
call fcn.00445450
mov ecx, dword [esp + 0x20]
test eax, eax
jne 0x491bfc
cmp ecx, dword [ebp]
jl 0x491ad0
cmp ecx, dword [ebp + 4]
jge 0x491ad0
mov eax, dword [edi]
test eax, eax
je 0x491ad0
mov eax, dword [eax + 0x14]
mov edx, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00445450
test eax, eax
jne 0x491c36
nop
mov ecx, dword [ebx + 0x14]
inc esi
cmp esi, dword [ecx + 0x14]
jl 0x491a50
mov ebp, ebx
mov ebx, ecx
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x2c], ecx
jmp 0x491a02
mov edx, dword [esp + 0x1c]
test edx, edx
jle 0x4916af
xor ecx, ecx
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x48], ebx
jmp 0x491b19
cmp edx, dword [ebx + 4]
jg 0x491b39
inc ecx
add eax, 0x14
cmp ecx, edi
je 0x4916af
mov edx, dword [eax + 8]
test edx, edx
js 0x491b0d
cmp dword [esp + 0x24], eax
je 0x491b0d
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x2c]
mov ebx, dword [ebx + 0x18]
lea ebx, [ebx + edx*8]
mov edx, dword [esi + edx*4]
cmp edx, dword [ebx]
jge 0x491b08
mov ebx, dword [esp + 0x48]
jmp 0x491a02
mov dword [esp + 0x28], 0
jmp 0x4916af
mov eax, dword [ebp]
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], 0
mov dword [esp + 0x28], 0
jmp 0x491611
mov esi, dword [esp + 0x38]
test esi, esi
je 0x4916c2
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0xc], ecx
mov edx, dword [esi + 0x3c]
mov dword [esp + 8], edx
mov edx, dword [esi + 0x14]
mov dword [esp + 4], edx
mov edx, dword [ebp + 0x10]
mov dword [esp], edx
call eax
jmp 0x4916c2
mov eax, dword [ebp + 0x50]
test eax, eax
je 0x491bb3
mov dword [esp], eax
call dword [0x6713e0]
mov edx, dword [esp + 0x28]
mov dword [esp], edx
call fcn.004452f0
mov edx, dword [ebp + 8]
mov dword [ebp + 0x50], eax
mov ecx, dword [edx + 0x14]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x2c]
shl ecx, 2
mov dword [ebp + 0x4c], eax
mov eax, dword [ebp + 0x54]
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov esi, dword [esp + 0x24]
mov eax, dword [ebp + 8]
mov edx, dword [esi + 4]
mov eax, dword [eax + 8]
mov eax, dword [eax + edx*4]
jmp 0x49172a
mov ebp, ebx
mov ebx, dword [ebx + 0x14]
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x2c], ecx
jmp 0x491a02
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x28]
mov eax, ebp
call fcn.004904f0
jmp 0x4916d9
mov edx, dword [esi + 0x14]
cmp dword [edx], 2
je 0x491c94
mov dword [esp + 0x3c], 1
jmp 0x4915fa
mov ebp, ebx
jmp 0x4916af
mov edi, dword [esp + 0x4c]
mov dword [esp + 8], 0x23
mov dword [esp + 0xc], edi
mov dword [esp + 4], 1
mov dword [esp], str.epsilon_transition_left_at_runtime_n
call sub.msvcrt.dll_fwrite
mov dword [ebp], 0xfffffffe
mov esi, dword [ebp + 0x18]
jmp 0x4918b0
mov eax, 2
jmp 0x4915a4
or eax, 0xffffffff
jmp 0x4915b0
mov ecx, dword [esp + 0x34]
mov edx, esi
mov eax, ebp
call fcn.004904f0
jmp 0x4919a8
mov eax, 1
jmp 0x4915b0
mov dword [esp + 0x28], esi
mov dword [ebp + 0x38], ecx
mov eax, edx
cmp eax, ebx
jl 0x4917b0
jmp 0x4916af
mov dword [esp + 0x28], esi
jmp 0x491ca7
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x28]
mov eax, ebp
call fcn.004904f0
jmp 0x49192c